beego: fixed serious Directory Traversal
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -13,7 +13,7 @@ import ( | ... | @@ -13,7 +13,7 @@ import ( |
| 13 | ) | 13 | ) |
| 14 | 14 | ||
| 15 | func serverStaticRouter(ctx *context.Context) bool { | 15 | func serverStaticRouter(ctx *context.Context) bool { |
| 16 | requestPath := ctx.Input.Request.URL.Path | 16 | requestPath := path.Clean(ctx.Input.Request.URL.Path) |
| 17 | for prefix, staticDir := range StaticDir { | 17 | for prefix, staticDir := range StaticDir { |
| 18 | if len(prefix) == 0 { | 18 | if len(prefix) == 0 { |
| 19 | continue | 19 | continue | ... | ... |
-
Please register or sign in to post a comment