FIX for #5251 to address minor URL decoding/parsing bug.

This commit is contained in:
Patrick Nelson 2016-04-01 11:44:29 -07:00
parent 5845b6089c
commit 9d9c572cf8

View File

@ -94,6 +94,7 @@ if (isset($_GET['url']) && php_sapi_name() !== 'cli-server') {
// Lighttpd and PHP 5.4's built-in webserver use this
} else {
// Get raw URL -- still needs to be decoded below (after parsing out query string).
$url = $_SERVER['REQUEST_URI'];
// Querystring args need to be explicitly parsed
@ -102,6 +103,9 @@ if (isset($_GET['url']) && php_sapi_name() !== 'cli-server') {
$parseQuery($query);
}
// Decode URL now that it has been separated from query string.
$url = urldecode($url);
// Pass back to the webserver for files that exist
if(php_sapi_name() === 'cli-server' && file_exists(BASE_PATH . $url) && is_file(BASE_PATH . $url)) {
return false;