Skip to content
Snippets Groups Projects
Commit e86c36cb authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#80887 by chx. Fix a bug with superglobal cleaning.

parent a3ac4ebe
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -140,7 +140,7 @@ function conf_path() { ...@@ -140,7 +140,7 @@ function conf_path() {
function drupal_unset_globals() { function drupal_unset_globals() {
if (ini_get('register_globals')) { if (ini_get('register_globals')) {
$allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'access_check' => 1, 'GLOBALS' => 1); $allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'access_check' => 1, 'GLOBALS' => 1);
foreach ($GLOBALS as $key) { foreach ($GLOBALS as $key => $value) {
if (!isset($allowed[$key])) { if (!isset($allowed[$key])) {
unset($GLOBALS[$key]); unset($GLOBALS[$key]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment