diff --git a/include/common.php b/include/common.php index a28ffe0..23751b0 100644 --- a/include/common.php +++ b/include/common.php @@ -82,7 +82,12 @@ if (!defined('FORUM_DISABLE_STRIPSLASHES') && get_magic_quotes_gpc()) $_POST = stripslashes_array($_POST); $_COOKIE = stripslashes_array($_COOKIE); $_REQUEST = stripslashes_array($_REQUEST); - $_FILES = stripslashes_array($_FILES); + + function stripslashes_files(&$item, $key) + { + ($key != 'tmp_name') ? $item = stripslashes($item) : null; + } + array_walk_recursive($_FILES, 'stripslashes_files'); } // If a cookie name is not specified in config.php, we use the default (pun_cookie)