Файл: adultscript-2.0.3-pro/files/libraries/framework/compat/enviroment/register_globals_off.php
Строк: 15
<?php
defined('_VALID') or die('Restricted Access!');
if (ini_get('register_globals')) {
if (isset($_REQUEST['GLOBALS'])) {
die('<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
}
$ignore = array(
'GLOBALS' => 1,
'_GET' => 1,
'_POST' => 1,
'_COOKIE' => 1,
'_REQUEST' => 1,
'_SERVER' => 1,
'_ENV' => 1,
'_FILES' => 1
);
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES,
isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
foreach ($input as $k => $v) {
if (!isset($ignore[$k]) && isset($GLOBALS[$k])) {
unset($GLOBALS[$k]);
}
}
unset($input);
ini_set('register_globals', 'off');
}
?>