From 163717b5e9d2a3337eb191ce99cfbdbcaaf0590b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 19 May 2015 23:04:09 +0200 Subject: [PATCH] Get rid of magic_quotes support --- .../install/files/lib/system/WCF.class.php | 36 ------------------- .../install/files/lib/system/WCFACP.class.php | 1 - 2 files changed, 37 deletions(-) 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(); -- 2.20.1