From 78b5356f2b1945a90de1ef7f2c7669d82098edbd Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 11 Dec 2021 17:26:21 +0300 Subject: fileserver: do not double-escape paths (#4447) --- modules/caddyhttp/caddyhttp.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'modules/caddyhttp/caddyhttp.go') diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index 1404c79..784b2b9 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -20,7 +20,6 @@ import ( "io" "net" "net/http" - "net/url" "path/filepath" "strconv" "strings" @@ -228,7 +227,6 @@ func StatusCodeMatches(actual, configured int) bool { // never be outside of root. The resulting path can be used // with the local file system. func SanitizedPathJoin(root, reqPath string) string { - reqPath, _ = url.PathUnescape(reqPath) if root == "" { root = "." } -- cgit v1.2.3