X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=dirlistozxa.php;h=7654e8f0b5fec8776aa9a3245fb88b2a4f0e2436;hb=eadae9019c993492def9216cebeb00859e9413d7;hp=6253106db48b306391f2bc0f6503ede5c5012ee0;hpb=dddeba252b4dbe0e082883f89a5be3b721a1be69;p=dirlistozxa.git diff --git a/dirlistozxa.php b/dirlistozxa.php index 6253106..7654e8f 100644 --- a/dirlistozxa.php +++ b/dirlistozxa.php @@ -35,6 +35,9 @@ $ignore_file_list = [ // nginx with default configuration (merge_slashes) doesn't actually need this. $_SERVER['REQUEST_URI'] = str_replace('../', '', $_SERVER['REQUEST_URI']); +// Allow spaces and other heretical stuff in folder names. +$_SERVER['REQUEST_URI'] = urldecode($_SERVER['REQUEST_URI']); + $folder = str_replace('?'.$_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']); $path = $_SERVER['DOCUMENT_ROOT'].$folder;