mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge remote-tracking branch 'naderman/ticket/10149' into develop-olympus
* naderman/ticket/10149: [ticket/10149] Skip foreach over GLOBALS cookie values if cookie is scalar
This commit is contained in:
commit
116744d4e5
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue