[config] clean cookies on phpMyAdmin upgrade
This commit is contained in:
@@ -2807,6 +2807,22 @@ if (get_magic_quotes_gpc()) {
|
|||||||
PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
|
PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clean cookies on new install or upgrade
|
||||||
|
* when chaning something with increment the cookie version
|
||||||
|
*/
|
||||||
|
$pma_cookie_version = 3;
|
||||||
|
if (isset($_COOKIE)
|
||||||
|
&& (! isset($_COOKIE['pmaCookieVer'])
|
||||||
|
|| $_COOKIE['pmaCookieVer'] < $pma_cookie_version)) {
|
||||||
|
// delete all cookies
|
||||||
|
foreach($_COOKIE as $cookie_name => $tmp) {
|
||||||
|
PMA_removeCookie($cookie_name);
|
||||||
|
}
|
||||||
|
$_COOKIE = array();
|
||||||
|
PMA_setCookie('pmaCookieVer', $pma_cookie_version);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* include deprecated grab_globals only if required
|
* include deprecated grab_globals only if required
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user