Replace urlencode by rawurlencode

Send image if url are not valide in get method
This commit is contained in:
Knah Tsaeb 2013-03-26 15:30:36 +01:00
parent 21f406bd6b
commit 73f5564569

View file

@ -199,10 +199,12 @@ if ($_GET) {
die('I take a chips and give it to Godzilla. I print a shoes and .............. KAMOULOX ! Well done Jean Pierre.');
}
$ui['url'] = urldecode($ui['url']);
$ui['url'] = rawurldecode($ui['url']);
$testUrl = testValidUrl($ui['url']);
if ($testUrl !== true) {
echo $testUrl['msg'];
header("Content-type: image/png");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
echo file_get_contents('bin/error.png');
exit();
}
@ -245,7 +247,7 @@ if ($_POST) {
}
verifToken($ui['token']);
$ui['url'] = urldecode($ui['url']);
$ui['url'] = rawurldecode($ui['url']);
$testUrl = testValidUrl($ui['url']);
if ($testUrl !== true) {