~cadence/bliz

9dce870d878aafa07051401b1b4ce8b821b18d3b — Cadence Ember 11 months ago e4313a3
Normalise path to remove /./
1 files changed, 6 insertions(+), 0 deletions(-)

M src/cgi.fish
M src/cgi.fish => src/cgi.fish +6 -0
@@ 58,6 58,12 @@ if contains .. (string split -- / $req_path)
    exit
end

# normalise path to remove /./, some broken clients add it
if set req_path_normal (string replace -a -- /. '' $req_path)
    gem_header 30 $req_path_normal
    exit
end

# directory listing
if test -d "$file_path"
    # ensure directory has trailing /