More paranoia

git-svn-id: file:///svn/phpbb/trunk@4427 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ludovic Arnaud 2003-08-23 21:51:31 +00:00
parent 3eb6414cc9
commit 3ad05b08cc

View file

@ -28,6 +28,15 @@ error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitia
//error_reporting(E_ALL); //error_reporting(E_ALL);
set_magic_quotes_runtime(0); set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals'))
{
foreach ($_REQUEST as $var_name => $void)
{
unset(${$var_name});
}
}
// If magic quotes is off, addslashes // If magic quotes is off, addslashes
if (!get_magic_quotes_gpc()) if (!get_magic_quotes_gpc())
{ {
@ -36,6 +45,7 @@ if (!get_magic_quotes_gpc())
$_COOKIE = slash_input_data($_COOKIE); $_COOKIE = slash_input_data($_COOKIE);
} }
require($phpbb_root_path . 'config.'.$phpEx); require($phpbb_root_path . 'config.'.$phpEx);
if (!defined('PHPBB_INSTALLED')) if (!defined('PHPBB_INSTALLED'))
@ -139,6 +149,7 @@ define('ACL_USERS_TABLE', $table_prefix.'auth_users');
define('ATTACHMENTS_TABLE', $table_prefix.'attachments'); define('ATTACHMENTS_TABLE', $table_prefix.'attachments');
define('ATTACHMENTS_DESC_TABLE', $table_prefix.'attach_desc'); define('ATTACHMENTS_DESC_TABLE', $table_prefix.'attach_desc');
define('BANLIST_TABLE', $table_prefix.'banlist'); define('BANLIST_TABLE', $table_prefix.'banlist');
define('BBCODES_TABLE', $table_prefix.'bbcodes');
define('CACHE_TABLE', $table_prefix.'cache'); define('CACHE_TABLE', $table_prefix.'cache');
define('CONFIG_TABLE', $table_prefix.'config'); define('CONFIG_TABLE', $table_prefix.'config');
define('CONFIRM_TABLE', $table_prefix.'confirm'); define('CONFIRM_TABLE', $table_prefix.'confirm');