diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-12 23:22:54 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-12 23:22:54 +0000 |
commit | 887bef5659e15319e087bc28c96ce25df44affa2 (patch) | |
tree | 0c40f9931780634ba98baab1af56759355e16f27 /phpBB/common.php | |
parent | 902d5c63ed88af85342ec632ce545090a2027765 (diff) | |
download | forums-887bef5659e15319e087bc28c96ce25df44affa2.tar forums-887bef5659e15319e087bc28c96ce25df44affa2.tar.gz forums-887bef5659e15319e087bc28c96ce25df44affa2.tar.bz2 forums-887bef5659e15319e087bc28c96ce25df44affa2.tar.xz forums-887bef5659e15319e087bc28c96ce25df44affa2.zip |
Stupid oversight on slashing vars fixed ... doh
git-svn-id: file:///svn/phpbb/trunk@843 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/common.php')
-rw-r--r-- | phpBB/common.php | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index 5c4db5e658..b6de4aebc2 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -32,23 +32,56 @@ set_magic_quotes_runtime(0); // Disable magic_quotes_runtime // if( !get_magic_quotes_gpc() ) { - @reset($HTTP_GET_VARS); while( list($k, $v) = each($HTTP_GET_VARS) ) { - $HTTP_GET_VARS[$k] = addslashes($v); + if( is_array($HTTP_GET_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) + { + $HTTP_GET_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_GET_VARS[$k]); + } + else + { + $HTTP_GET_VARS[$k] = addslashes($v); + } } + @reset($HTTP_GET_VARS); - @reset($HTTP_POST_VARS); while( list($k, $v) = each($HTTP_POST_VARS) ) { - $HTTP_POST_VARS[$k] = addslashes($v); + if( is_array($HTTP_POST_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) + { + $HTTP_POST_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_POST_VARS[$k]); + } + else + { + $HTTP_POST_VARS[$k] = addslashes($v); + } } + @reset($HTTP_POST_VARS); - @reset($HTTP_COOKIE_VARS); while( list($k, $v) = each($HTTP_COOKIE_VARS) ) { - $HTTP_COOKIE_VARS[$k] = addslashes($v); + if( is_array($HTTP_COOKIE_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) + { + $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_COOKIE_VARS[$k]); + } + else + { + $HTTP_COOKIE_VARS[$k] = addslashes($v); + } } + @reset($HTTP_COOKIE_VARS); } // |