mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Attempt to deal with security issues which are arising in MODs which are not correctly setting phpbb_root_path and/or testing IN_PHPBB in their code
No functional changes to the behaviour of phpBB itself git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5963 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
0821474a5c
commit
44d3ba4582
1 changed files with 4 additions and 3 deletions
|
@ -24,8 +24,8 @@ if ( !defined('IN_PHPBB') )
|
|||
die("Hacking attempt");
|
||||
}
|
||||
|
||||
//
|
||||
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
|
||||
|
||||
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
|
||||
|
||||
// The following code (unsetting globals)
|
||||
|
@ -82,10 +82,11 @@ if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals
|
|||
|
||||
while (list($var,) = @each($input))
|
||||
{
|
||||
if (!in_array($var, $not_unset))
|
||||
if (in_array($var, $not_unset))
|
||||
{
|
||||
unset($$var);
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
unset($$var);
|
||||
}
|
||||
|
||||
unset($input);
|
||||
|
|
Loading…
Add table
Reference in a new issue