Get rid of magic_quotes support
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 May 2015 21:04:09 +0000 (23:04 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 May 2015 21:04:09 +0000 (23:04 +0200)
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/WCFACP.class.php

index 9fa0874a663737ad25fb36fc313e27a501a04519..4b0d76c140c8068a783ea5a8f09d5080c7a5c86c 100644 (file)
@@ -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.
         * 
index 7ea78517d9fb9d8f76ed3d20b3fcadf48b710c8d..9513e839b605ca91eb201dcaa0dcdde2c6b4bd54 100644 (file)
@@ -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();