From eee231dfae919b95daad4e7dbbe41e0e7dea7bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 8 Mar 2002 16:43:29 +0000 Subject: [PATCH] some settings were missing for the password cookie --- ChangeLog | 2 ++ libraries/auth/cookie.auth.lib.php3 | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ac62ce52..afb6d8a8c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ $Source$ * header.inc.php3, lines 161-165; user_details.php3, lines 978-980; libraries/common.lib.php3, lines 229-232: headers were sometimes missing before an error is displayed. + * libraries/auth/cookie.auth.lib.php3, lines 377-381: some settings were + missing for the password cookie. 2002-03-07 Marc Delisle * Documentation.html, config.inc.php3, libraries/common.lib.php3: diff --git a/libraries/auth/cookie.auth.lib.php3 b/libraries/auth/cookie.auth.lib.php3 index c5741499e..09bca6577 100644 --- a/libraries/auth/cookie.auth.lib.php3 +++ b/libraries/auth/cookie.auth.lib.php3 @@ -279,9 +279,7 @@ if (uname.value == '') { // The user wants to be logged out -> delete password cookie if (!empty($old_usr)) { - setcookie('pma_cookie_password', '', 0, - $GLOBALS['cookie_path'], '' , - $GLOBALS['is_https']); + setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']); } // The user just logged in @@ -370,13 +368,18 @@ if (uname.value == '') { // Set cookies if required (once per session) if (!$from_cookie) { // Duration = one month for username - setcookie('pma_cookie_username', $cfgServer['user'], + setcookie('pma_cookie_username', + $cfgServer['user'], time() + (60 * 60 * 24 * 30), $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']); // Duration = till the browser is closed for password - setcookie('pma_cookie_password', $cfgServer['password'], 0, $GLOBALS['cookie_path']); - } + setcookie('pma_cookie_password', + $cfgServer['password'], + 0, + $GLOBALS['cookie_path'], '' + $GLOBALS['is_https']); + } // end if return TRUE; } // end of the 'PMA_auth_set_user()' function @@ -392,9 +395,7 @@ if (uname.value == '') { function PMA_auth_fails() { // Deletes password cookie and displays the login form - setcookie('pma_cookie_password', '', 0, - $GLOBALS['cookie_path'], '' , - $GLOBALS['is_https']); + setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']); PMA_auth(); return TRUE;