Skip to content

Commit 18fee2a

Browse files
committed
beego: fixed serious Directory Traversal
1 parent 4124760 commit 18fee2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staticfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func serverStaticRouter(ctx *context.Context) bool {
16-
requestPath := ctx.Input.Request.URL.Path
16+
requestPath := path.Clean(ctx.Input.Request.URL.Path)
1717
for prefix, staticDir := range StaticDir {
1818
if len(prefix) == 0 {
1919
continue

0 commit comments

Comments
 (0)