From 5250f7e792f62e93e08dfaa65b8645b50d6cb559 Mon Sep 17 00:00:00 2001 From: kink Date: Thu, 20 Feb 2003 09:40:03 +0000 Subject: [PATCH] rg=0 broke some functionality that plugins relied on. fix 682962 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4530 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ src/login.php | 4 ++-- src/redirect.php | 21 ++++++--------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8db40ac..a8672d25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ Version 1.4.0 CVS - Updates in conf.pl to infamous delete_folder setting, including addition of appropriate default value for courier and UW. - Fix for date/time display in certain timezones + - Fix some features of login.php that are used by some plugins and was broken + by register_globals = off. Version 1.4.0 RC 2a ------------------- diff --git a/src/login.php b/src/login.php index 9fd1c6ab..3bb63e92 100644 --- a/src/login.php +++ b/src/login.php @@ -43,7 +43,7 @@ $base_uri = sqm_baseuri(); * In case the last session was not terminated properly, make sure * we get a new one. */ - + sqsession_destroy(); header('Pragma: no-cache'); @@ -69,7 +69,7 @@ $username_form_name = 'login_username'; $password_form_name = 'secretkey'; do_hook('login_top'); -$loginname_value = (isset($loginname) ? htmlspecialchars($loginname) : ''); +$loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : ''); /* If they don't have a logo, don't bother.. */ if (isset($org_logo) && $org_logo) { diff --git a/src/redirect.php b/src/redirect.php index ad0d31de..6ed15fc9 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -53,22 +53,13 @@ sqsession_unregister ('user_is_logged_in'); sqsession_register ($base_uri, 'base_uri'); /* get globals we me need */ -if (isset($_POST['login_username'])) { - $login_username = $_POST['login_username']; -} -if (!isset($_COOKIE['squirrelmail_language']) || - $squirrelmail_language == '' ) { - $squirrelmail_language = $squirrelmail_default_language; -} -else { - $squirrelmail_language = $_COOKIE['squirrelmail_language']; -} -if (isset($_POST['secretkey'])) { - $secretkey = $_POST['secretkey']; -} -if (isset($_POST['js_autodetect_results'])) { - $js_autodetect_results = $_POST['js_autodetect_results']; +sqGetGlobalVar('login_username', $login_username); +sqGetGlobalVar('secretkey', $secretkey); +sqGetGlobalVar('js_autodetect_results', $js_autodetect_results); +if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') { + $squirrelmail_language = $squirrelmail_default_language; } + /* end of get globals */ set_up_language($squirrelmail_language, true); -- 2.25.1