some settings were missing for the password cookie

This commit is contained in:
Loïc Chapeaux
2002-03-08 16:43:29 +00:00
parent 736e7faa3a
commit eee231dfae
2 changed files with 12 additions and 9 deletions

View File

@@ -16,6 +16,8 @@ $Source$
* header.inc.php3, lines 161-165; user_details.php3, lines 978-980; * header.inc.php3, lines 161-165; user_details.php3, lines 978-980;
libraries/common.lib.php3, lines 229-232: headers were sometimes missing libraries/common.lib.php3, lines 229-232: headers were sometimes missing
before an error is displayed. 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 <lem9@users.sourceforge.net> 2002-03-07 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html, config.inc.php3, libraries/common.lib.php3: * Documentation.html, config.inc.php3, libraries/common.lib.php3:

View File

@@ -279,9 +279,7 @@ if (uname.value == '') {
// The user wants to be logged out -> delete password cookie // The user wants to be logged out -> delete password cookie
if (!empty($old_usr)) { if (!empty($old_usr)) {
setcookie('pma_cookie_password', '', 0, setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
$GLOBALS['cookie_path'], '' ,
$GLOBALS['is_https']);
} }
// The user just logged in // The user just logged in
@@ -370,13 +368,18 @@ if (uname.value == '') {
// Set cookies if required (once per session) // Set cookies if required (once per session)
if (!$from_cookie) { if (!$from_cookie) {
// Duration = one month for username // Duration = one month for username
setcookie('pma_cookie_username', $cfgServer['user'], setcookie('pma_cookie_username',
$cfgServer['user'],
time() + (60 * 60 * 24 * 30), time() + (60 * 60 * 24 * 30),
$GLOBALS['cookie_path'], '' , $GLOBALS['cookie_path'], '' ,
$GLOBALS['is_https']); $GLOBALS['is_https']);
// Duration = till the browser is closed for password // 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; return TRUE;
} // end of the 'PMA_auth_set_user()' function } // end of the 'PMA_auth_set_user()' function
@@ -392,9 +395,7 @@ if (uname.value == '') {
function PMA_auth_fails() function PMA_auth_fails()
{ {
// Deletes password cookie and displays the login form // Deletes password cookie and displays the login form
setcookie('pma_cookie_password', '', 0, setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);
$GLOBALS['cookie_path'], '' ,
$GLOBALS['is_https']);
PMA_auth(); PMA_auth();
return TRUE; return TRUE;