]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove checks for safe mode and magic quotes
authorLukas Reschke <lukas@owncloud.com>
Fri, 5 Dec 2014 18:14:47 +0000 (19:14 +0100)
committerLukas Reschke <lukas@owncloud.com>
Fri, 5 Dec 2014 18:14:47 +0000 (19:14 +0100)
Both are removed from 5.4.0

Safe Mode: http://php.net/manual/en/features.safe-mode.php
> This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

Magic Quotes: http://php.net/manual/en/security.magicquotes.php
> This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

lib/base.php
lib/private/httphelper.php
lib/private/util.php

index 74b668551ab5442d6869eeb369e6fb510e4c3d0d..7d70f98452fc749057634d91a6b14708a4e0d2ba 100644 (file)
@@ -481,10 +481,6 @@ class OC {
                date_default_timezone_set('UTC');
                ini_set('arg_separator.output', '&amp;');
 
-               // try to switch magic quotes off.
-               if (get_magic_quotes_gpc() == 1) {
-                       ini_set('magic_quotes_runtime', 0);
-               }
                //try to configure php to enable big file uploads.
                //this doesn´t work always depending on the webserver and php configuration.
                //Let´s try to overwrite some defaults anyways
index 8b7aebb3d4d45487e78cdebce5cc2fb690c3a5c4..dfc1bcf47cd2f4c7738a4d7f80cf03cebf26759d 100644 (file)
@@ -72,7 +72,7 @@ class HTTPHelper {
                                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUserPwd);
                        }
 
-                       if (ini_get('open_basedir') === '' && (ini_get('safe_mode') === false) || strtolower(ini_get('safe_mode')) === 'off') {
+                       if (ini_get('open_basedir') === '') {
                                curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
                                curl_setopt($curl, CURLOPT_MAXREDIRS, $max_redirects);
                                $data = curl_exec($curl);
index 38db431e895d243e29c9572c4cff7d40eed42d91..d28fa80160c6f72985c0dce8671cd9f50545edf7 100644 (file)
@@ -613,26 +613,6 @@ class OC_Util {
                        );
                        $webServerRestart = true;
                }
-               if (((strtolower(@ini_get('safe_mode')) == 'on')
-                       || (strtolower(@ini_get('safe_mode')) == 'yes')
-                       || (strtolower(@ini_get('safe_mode')) == 'true')
-                       || (ini_get("safe_mode") == 1))
-               ) {
-                       $errors[] = array(
-                               'error' => $l->t('PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.'),
-                               'hint' => $l->t('PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. '
-                                       . 'Please ask your server administrator to disable it in php.ini or in your webserver config.')
-                       );
-                       $webServerRestart = true;
-               }
-               if (get_magic_quotes_gpc() == 1) {
-                       $errors[] = array(
-                               'error' => $l->t('Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.'),
-                               'hint' => $l->t('Magic Quotes is a deprecated and mostly useless setting that should be disabled. '
-                                       . 'Please ask your server administrator to disable it in php.ini or in your webserver config.')
-                       );
-                       $webServerRestart = true;
-               }
                if (!self::isAnnotationsWorking()) {
                        $errors[] = array(
                                'error' => 'PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.',