18fee2ad by astaxie

beego: fixed serious Directory Traversal

1 parent 41247607
...@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!