Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#80 using curl command line escapeshellcmd will cause bug

open
nobody
None
5
2013-06-18
2012-04-15
jessekii
No

escapeshellcmd will change '?' to '\?' , and will cause 404 not found bug !

so I changed the code:
Line 1012

exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);

to

$safe_url = str_replace(array(' ', '"'), array('%20', '%22'), $URI);
exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".$safe_url."\"",$results,$return);

Discussion