diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-10 10:57:59 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-10 10:57:59 +0200 |
commit | 660e9c4012e49240a8e60186e864dde3ec3488fe (patch) | |
tree | 5f6aa17a81b65fdef92064f8ba7fea0fb5d61155 /lib | |
parent | 2cc26c90226af5372aef33c80d876b9b259b1d62 (diff) | |
parent | 2d03019c91ab8d07dfbfb1e54db86d0c4978ab9a (diff) | |
download | nextcloud-server-660e9c4012e49240a8e60186e864dde3ec3488fe.tar.gz nextcloud-server-660e9c4012e49240a8e60186e864dde3ec3488fe.zip |
Merge pull request #11501 from Ansud/master
Urlencode file name before passing it to cURL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/largefilehelper.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php index 2c35feefc8b..d5b7946feff 100644 --- a/lib/private/largefilehelper.php +++ b/lib/private/largefilehelper.php @@ -101,7 +101,8 @@ class LargeFileHelper { */ public function getFileSizeViaCurl($filename) { if (function_exists('curl_init')) { - $ch = curl_init("file://$filename"); + $fencoded = urlencode($filename); + $ch = curl_init("file://$fencoded"); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); |