Updated Kohana to r4728

This commit is contained in:
Bharat Mediratta
2009-12-23 12:42:57 -08:00
parent 05c50a0523
commit 3e8e13bd25
7 changed files with 104 additions and 126 deletions

View File

@@ -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)