Skip to content
Snippets Groups Projects
Commit 660e9c40 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #11501 from Ansud/master

Urlencode file name before passing it to cURL
parents 2cc26c90 2d03019c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment