mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-23 03:19:01 +01:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10149] Skip foreach over GLOBALS cookie values if cookie is scalar
This commit is contained in:
commit
c504888f03
@ -69,7 +69,7 @@ function deregister_globals()
|
||||
{
|
||||
if (isset($not_unset[$varname]))
|
||||
{
|
||||
// Hacking attempt. No point in continuing unless it's a COOKIE
|
||||
// Hacking attempt. No point in continuing unless it's a COOKIE (so a cookie called GLOBALS doesn't lock users out completely)
|
||||
if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))
|
||||
{
|
||||
exit;
|
||||
@ -79,6 +79,11 @@ function deregister_globals()
|
||||
$cookie = &$_COOKIE;
|
||||
while (isset($cookie['GLOBALS']))
|
||||
{
|
||||
if (!is_array($cookie['GLOBALS']))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($cookie['GLOBALS'] as $registered_var => $value)
|
||||
{
|
||||
if (!isset($not_unset[$registered_var]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user