diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-05 19:57:06 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-11 00:09:55 +0100 |
commit | 9ea205dc3dd27f6e2506a4867e29b12180251620 (patch) | |
tree | e063d01f8b4be75e3bf823928dbd53d06b51f2f9 /lib/private/largefilehelper.php | |
parent | d84a1f6f3ae380d42dbd2970d6b3bfedd5e01200 (diff) | |
download | nextcloud-server-9ea205dc3dd27f6e2506a4867e29b12180251620.tar.gz nextcloud-server-9ea205dc3dd27f6e2506a4867e29b12180251620.zip |
Check if open_basedir is set
The file:// protocol does not work with curl when an open_basedir is set.
This fixes https://github.com/owncloud/core/issues/12016
Diffstat (limited to 'lib/private/largefilehelper.php')
-rw-r--r-- | lib/private/largefilehelper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php index 750ba1d23de..b6a8c536e9b 100644 --- a/lib/private/largefilehelper.php +++ b/lib/private/largefilehelper.php @@ -100,7 +100,7 @@ class LargeFileHelper { * null on failure. */ public function getFileSizeViaCurl($filename) { - if (function_exists('curl_init')) { + if (function_exists('curl_init') && \OC::$server->getIniWrapper()->getString('open_basedir') === '') { $fencoded = rawurlencode($filename); $ch = curl_init("file://$fencoded"); curl_setopt($ch, CURLOPT_NOBODY, true); |