Skip to content

Commit

Permalink
Merge pull request #11501 from Ansud/master
Browse files Browse the repository at this point in the history
Urlencode file name before passing it to cURL
  • Loading branch information
Vincent Petry committed Oct 10, 2014
2 parents 2cc26c9 + 2d03019 commit 660e9c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/largefilehelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public function getFileSize($filename) {
*/
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);
Expand Down

0 comments on commit 660e9c4

Please sign in to comment.