diff --git a/ChangeLog b/ChangeLog index 86acf8ad1..e8d1f38b4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-04-27 Michal Čihař + * 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ř * libraries/plugin_interface.lib.php: - Display information that there are no settings. diff --git a/Documentation.html b/Documentation.html index 2659a2d14..62affc35d 100755 --- a/Documentation.html +++ b/Documentation.html @@ -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. +
$cfg[LoginCookieDeleteAll] boolean
+
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.
+
$cfg[UseDbSearch] boolean
Define whether the "search string inside database" is enabled or not.
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index f97ef85ee..cb106899b 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -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 diff --git a/libraries/config.default.php b/libraries/config.default.php index 9c7ea6f3e..abd92154d 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -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