Skip to content

Commit 3f9933a

Browse files
committed
fix: unescape URL path to handle '#' in filenames
Fixes #9361
1 parent f3d6230 commit 3f9933a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/middlewares/down.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package middlewares
22

33
import (
4+
"net/url"
45
"strings"
56

67
"github.com/alist-org/alist/v3/internal/conf"
@@ -41,9 +42,8 @@ func Down(verifyFunc func(string, string) error) func(c *gin.Context) {
4142
}
4243
}
4344

44-
// TODO: implement
45-
// path maybe contains # ? etc.
4645
func parsePath(path string) string {
46+
path, _ = url.PathUnescape(path)
4747
return utils.FixAndCleanPath(path)
4848
}
4949

0 commit comments

Comments
 (0)