From 3ad05b08cca23c8a0b9461660e78daec41d0b8f2 Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Sat, 23 Aug 2003 21:51:31 +0000 Subject: [PATCH] More paranoia git-svn-id: file:///svn/phpbb/trunk@4427 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/common.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpBB/common.php b/phpBB/common.php index cceda2739b..c730862e07 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -28,6 +28,15 @@ error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitia //error_reporting(E_ALL); 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 (!get_magic_quotes_gpc()) { @@ -36,6 +45,7 @@ if (!get_magic_quotes_gpc()) $_COOKIE = slash_input_data($_COOKIE); } + require($phpbb_root_path . 'config.'.$phpEx); if (!defined('PHPBB_INSTALLED')) @@ -139,6 +149,7 @@ define('ACL_USERS_TABLE', $table_prefix.'auth_users'); define('ATTACHMENTS_TABLE', $table_prefix.'attachments'); define('ATTACHMENTS_DESC_TABLE', $table_prefix.'attach_desc'); define('BANLIST_TABLE', $table_prefix.'banlist'); +define('BBCODES_TABLE', $table_prefix.'bbcodes'); define('CACHE_TABLE', $table_prefix.'cache'); define('CONFIG_TABLE', $table_prefix.'config'); define('CONFIRM_TABLE', $table_prefix.'confirm');