Check before commit!

This commit is contained in:
Michal Čihař
2006-11-17 08:49:30 +00:00
parent f0780e3129
commit fb9a3a598e
264 changed files with 12328 additions and 5376 deletions

View File

@@ -303,10 +303,10 @@ function PMA_auth_check()
if (!empty($old_usr)) {
if ($GLOBALS['cfg']['LoginCookieDeleteAll']) {
foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
setcookie('pma_cookie_password-' . $key, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
PMA_removeCookie('pma_cookie_password-' . $key);
}
} else {
setcookie('pma_cookie_password-' . $server, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
PMA_removeCookie('pma_cookie_password-' . $server);
}
}
@@ -437,20 +437,14 @@ function PMA_auth_set_user()
// Name and password cookies needs to be refreshed each time
// Duration = one month for username
setcookie('pma_cookie_username-' . $server,
PMA_blowfish_encrypt($cfg['Server']['user'] . ':' . $GLOBALS['current_time'],
$GLOBALS['cfg']['blowfish_secret']),
time() + (60 * 60 * 24 * 30),
$GLOBALS['cookie_path'], '',
$GLOBALS['is_https']);
PMA_setCookie('pma_cookie_username-' . $server, PMA_blowfish_encrypt($cfg['Server']['user'] . ':' . $GLOBALS['current_time'], $GLOBALS['cfg']['blowfish_secret']));
// Duration = till the browser is closed for password (we don't want this to be saved)
setcookie('pma_cookie_password-' . $server,
// Duration = as configured
PMA_setCookie('pma_cookie_password-' . $server,
PMA_blowfish_encrypt(!empty($cfg['Server']['password']) ? $cfg['Server']['password'] : "\xff(blank)",
$GLOBALS['cfg']['blowfish_secret'] . $GLOBALS['current_time']),
$GLOBALS['cfg']['LoginCookieStore'],
$GLOBALS['cookie_path'], '',
$GLOBALS['is_https']);
null,
$GLOBALS['cfg']['LoginCookieStore']);
// Set server cookies if required (once per session) and, in this case, force
// reload to ensure the client accepts cookies
@@ -458,14 +452,10 @@ function PMA_auth_set_user()
if ($GLOBALS['cfg']['AllowArbitraryServer']) {
if (isset($pma_auth_server) && !empty($pma_auth_server) && $pma_server_changed) {
// Duration = one month for serverrname
setcookie('pma_cookie_servername-' . $server,
$cfg['Server']['host'],
time() + (60 * 60 * 24 * 30),
$GLOBALS['cookie_path'], '',
$GLOBALS['is_https']);
PMA_setCookie('pma_cookie_servername-' . $server, $cfg['Server']['host']);
} else {
// Delete servername cookie
setcookie('pma_cookie_servername-' . $server, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
PMA_removeCookie('pma_cookie_servername-' . $server);
}
}
@@ -510,7 +500,7 @@ function PMA_auth_fails()
global $conn_error, $server;
// Deletes password cookie and displays the login form
setcookie('pma_cookie_password-' . $server, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
PMA_removeCookie('pma_cookie_password-' . $server);
if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
$conn_error = $GLOBALS['strAccessDenied'];