The branch, master has been updated via cd74e9fa5d74b7ec2abd12040d47e69acbf3fc7e (commit) from a6e6c3fcf17fefd644bca3e7bce0311497ede539 (commit)
- Log ----------------------------------------------------------------- commit cd74e9fa5d74b7ec2abd12040d47e69acbf3fc7e Author: Michal Čihař mcihar@novell.com Date: Tue Feb 8 13:15:01 2011 +0100
bug #3175227 [auth] Reset user cache on login.
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 1 + libraries/auth/cookie.auth.lib.php | 6 ++++++ libraries/auth/signon.auth.lib.php | 5 +++++ libraries/common.lib.php | 7 +++++++ 4 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog index a283d89..6089439 100644 --- a/ChangeLog +++ b/ChangeLog @@ -134,6 +134,7 @@ - [security] Redirect external links to avoid Referer leakage. - [interface] Default to not count tables in database. - patch #3172172 [interface] Shortcut for copying table row. +- bug #3175227 [auth] Reset user cache on login.
3.3.10.0 (not yet released) - patch #3147400 [structure] Aria table size printed as unknown, diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index cb0daa6..84bfa80 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -596,6 +596,12 @@ function PMA_auth_set_user() * whether we come from a fresh cookie login */ define('PMA_COMING_FROM_COOKIE_LOGIN', true); + + /** + * Clear user cache. + */ + PMA_clearUserCache(); + PMA_sendHeaderLocation($redirect_url . PMA_generate_common_url($url_params, '&')); exit(); } // end if diff --git a/libraries/auth/signon.auth.lib.php b/libraries/auth/signon.auth.lib.php index 4215408..8480c46 100644 --- a/libraries/auth/signon.auth.lib.php +++ b/libraries/auth/signon.auth.lib.php @@ -131,6 +131,11 @@ function PMA_auth_check() if (!empty($pma_token)) { $_SESSION[' PMA_token '] = $pma_token; } + + /** + * Clear user cache. + */ + PMA_clearUserCache(); }
// Returns whether we get authentication settings or not diff --git a/libraries/common.lib.php b/libraries/common.lib.php index ca39131..c8d4290 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2529,6 +2529,13 @@ function PMA_generate_slider_effect($id, $message) }
/** + * Clears cache content which needs to be refreshed on user change. + */ +function PMA_clearUserCache() { + PMA_cacheUnset('is_superuser', true); +} + +/** * Verifies if something is cached in the session * * @param string $var
hooks/post-receive