summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2014-12-05 21:17:40 +0100
committerRobin Appelman <robin@icewind.nl>2014-12-05 21:17:40 +0100
commite47f4758f2f178c4c75bb1641674d7a6bf960f61 (patch)
tree2b2cc9ab5e47a02f1f93ec316eb8a3f1d91583ee
parent1be5a3ca8925051b477370defa3f5ed0af45670c (diff)
parentddcf2b84ec158d035c77693664dac8bd40e1b6e7 (diff)
downloadnextcloud-server-e47f4758f2f178c4c75bb1641674d7a6bf960f61.tar.gz
nextcloud-server-e47f4758f2f178c4c75bb1641674d7a6bf960f61.zip
Merge pull request #12646 from owncloud/remove-safe-magic-quotes
Remove checks for safe mode and magic quotes
-rw-r--r--lib/base.php4
-rw-r--r--lib/private/httphelper.php2
-rw-r--r--lib/private/util.php20
3 files changed, 1 insertions, 25 deletions
diff --git a/lib/base.php b/lib/base.php
index 74b668551ab..7d70f98452f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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
diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php
index 8b7aebb3d4d..dfc1bcf47cd 100644
--- a/lib/private/httphelper.php
+++ b/lib/private/httphelper.php
@@ -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);
diff --git a/lib/private/util.php b/lib/private/util.php
index 38db431e895..d28fa80160c 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -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.',