Logout from all servers by default (RFE #1370874).

This commit is contained in:
Michal Čihař
2006-04-27 08:40:22 +00:00
parent 817c2339bd
commit 15eb10076c
4 changed files with 20 additions and 2 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-04-27 Michal Čihař <michal@cihar.com>
* Documentation.html, libraries/config.default.php,
libraries/auth/cookie.auth.lib.php: Logout from all servers by default
(RFE #1370874).
2006-04-26 Michal Čihař <michal@cihar.com>
* libraries/plugin_interface.lib.php:
- Display information that there are no settings.

View File

@@ -1025,6 +1025,12 @@ ALTER TABLE `pma_column_comments`
means that it will be kept for existing session. This is recommended
for not trusted environments.</dd>
<dt id="cfg_LoginCookieDeleteAll">$cfg[LoginCookieDeleteAll] boolean</dt>
<dd>If enabled (default), logout deletes cookies for all servers,
otherwise only for current one. Setting this to false makes it easy to
forget to logout from other server, when you are using more of
them.</dd>
<dt id="cfg_UseDbSearch">$cfg[UseDbSearch] boolean</dt>
<dd>Define whether the "search string inside database" is enabled or not.</dd>

View File

@@ -278,9 +278,15 @@ function PMA_auth_check()
$from_cookie = false;
$from_form = false;
// The user wants to be logged out -> delete password cookie
// The user wants to be logged out -> delete password cookie(s)
if (!empty($old_usr)) {
setcookie('pma_cookie_password-' . $server, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
if ($GLOBALS['cfg']['LoginCookieDeleteAll']) {
foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
setcookie('pma_cookie_password-' . $key, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
}
} else {
setcookie('pma_cookie_password-' . $server, '', 0, $GLOBALS['cookie_path'], '', $GLOBALS['is_https']);
}
}
// The user just logged in

View File

@@ -137,6 +137,7 @@ $cfg['Confirm'] = TRUE; // confirm 'DROP TABLE' & 'DROP DATABA
$cfg['LoginCookieRecall'] = TRUE; // recall previous login in cookie auth. mode or not
$cfg['LoginCookieValidity'] = 1800; // validity of cookie login (in seconds)
$cfg['LoginCookieStore'] = 0; // how long login cookie should be stored (in seconds)
$cfg['LoginCookieDeleteAll'] = TRUE; // whether to delete all login cookies on logout
$cfg['UseDbSearch'] = TRUE; // whether to enable the "database search" feature
// or not
$cfg['IgnoreMultiSubmitErrors'] = FALSE; // if set to true, PMA continues computing multiple-statement queries