mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX for #5251 to address minor URL decoding/parsing bug.
This commit is contained in:
parent
5845b6089c
commit
9d9c572cf8
4
main.php
4
main.php
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user