mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Updated Kohana to r4728
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Input library.
|
||||
*
|
||||
* $Id: Input.php 4720 2009-12-17 21:15:03Z isaiah $
|
||||
* $Id: Input.php 4727 2009-12-23 19:03:05Z isaiah $
|
||||
*
|
||||
* @package Core
|
||||
* @author Kohana Team
|
||||
@@ -79,35 +79,6 @@ class Input_Core {
|
||||
Kohana_Log::add('debug', 'Disable magic_quotes_gpc! It is evil and deprecated: http://php.net/magic_quotes');
|
||||
}
|
||||
|
||||
// register_globals is enabled
|
||||
if (ini_get('register_globals'))
|
||||
{
|
||||
if (isset($_REQUEST['GLOBALS']))
|
||||
{
|
||||
// Prevent GLOBALS override attacks
|
||||
exit('Global variable overload attack.');
|
||||
}
|
||||
|
||||
// Destroy the REQUEST global
|
||||
$_REQUEST = array();
|
||||
|
||||
// These globals are standard and should not be removed
|
||||
$preserve = array('GLOBALS', '_REQUEST', '_GET', '_POST', '_FILES', '_COOKIE', '_SERVER', '_ENV', '_SESSION');
|
||||
|
||||
// This loop has the same effect as disabling register_globals
|
||||
foreach (array_diff(array_keys($GLOBALS), $preserve) as $key)
|
||||
{
|
||||
global $$key;
|
||||
$$key = NULL;
|
||||
|
||||
// Unset the global variable
|
||||
unset($GLOBALS[$key], $$key);
|
||||
}
|
||||
|
||||
// Warn the developer about register globals
|
||||
Kohana_Log::add('debug', 'Disable register_globals! It is evil and deprecated: http://php.net/register_globals');
|
||||
}
|
||||
|
||||
if (is_array($_GET))
|
||||
{
|
||||
foreach ($_GET as $key => $val)
|
||||
|
||||
Reference in New Issue
Block a user