DannyArends / DaNode

Small and flexible web server written using the D 2.0 language
https://www.dannyarends.nl
GNU General Public License v3.0
61 stars 2 forks source link

Files with names containing whitespace in `./www/*/` are not found; when requesting from Web Browser. #22

Closed BoQsc closed 2 years ago

BoQsc commented 2 years ago

Here you can see me placing a file named 123 123 into ./www/*/ directory image

The requested file is not found on the server due to browsers HTML URL Encoding. image

DannyArends commented 2 years ago

I think I disallowed that because of canonical URLs and the high possibility of it being exploited. I can see if there would be a work-around for static files.

Be aware that files without an extension aren't allowed either since the mime-type of the file cannot be figured out

DannyArends commented 2 years ago

Should be fixed in a38cc78450cb484442aaca1262c6fa2deb1bca68

I will need to still figure out that this doesn't break my own website/canonical URLs

Let me know if it works

BoQsc commented 2 years ago

Let me know if it works

Well done!

https://user-images.githubusercontent.com/21064622/146236733-295d0f8b-1ae9-446c-abfb-94680be7426b.mp4