From: Tim Düsterhus Date: Tue, 19 May 2015 21:04:09 +0000 (+0200) Subject: Get rid of magic_quotes support X-Git-Tag: 3.0.0_Beta_1~2378 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=163717b5e9d2a3337eb191ce99cfbdbcaaf0590b;p=GitHub%2FWoltLab%2FWCF.git Get rid of magic_quotes support --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 9fa0874a66..4b0d76c140 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -137,7 +137,6 @@ class WCF { if (!defined('TMP_DIR')) define('TMP_DIR', FileUtil::getTempFolder()); // start initialization - $this->initMagicQuotes(); $this->initDB(); $this->loadOptions(); $this->initSession(); @@ -183,41 +182,6 @@ class WCF { } } - /** - * Removes slashes in superglobal gpc data arrays if 'magic quotes gpc' is enabled. - */ - protected function initMagicQuotes() { - if (function_exists('get_magic_quotes_gpc')) { - if (@get_magic_quotes_gpc()) { - if (!empty($_REQUEST)) { - $_REQUEST = ArrayUtil::stripslashes($_REQUEST); - } - if (!empty($_POST)) { - $_POST = ArrayUtil::stripslashes($_POST); - } - if (!empty($_GET)) { - $_GET = ArrayUtil::stripslashes($_GET); - } - if (!empty($_COOKIE)) { - $_COOKIE = ArrayUtil::stripslashes($_COOKIE); - } - if (!empty($_FILES)) { - foreach ($_FILES as $name => $attributes) { - foreach ($attributes as $key => $value) { - if ($key != 'tmp_name') { - $_FILES[$name][$key] = ArrayUtil::stripslashes($value); - } - } - } - } - } - } - - if (function_exists('set_magic_quotes_runtime')) { - @set_magic_quotes_runtime(0); - } - } - /** * Returns the database object. * diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 7ea78517d9..9513e839b6 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -36,7 +36,6 @@ class WCFACP extends WCF { if (!defined('TMP_DIR')) define('TMP_DIR', FileUtil::getTempFolder()); // start initialization - $this->initMagicQuotes(); $this->initDB(); $this->loadOptions(); $this->initPackage();