1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 22:30:49 +00:00

beego: fixed serious Directory Traversal

This commit is contained in:
astaxie 2014-04-08 17:43:25 +08:00
parent 4124760706
commit 18fee2ad9a

View File

@ -13,7 +13,7 @@ import (
)
func serverStaticRouter(ctx *context.Context) bool {
requestPath := ctx.Input.Request.URL.Path
requestPath := path.Clean(ctx.Input.Request.URL.Path)
for prefix, staticDir := range StaticDir {
if len(prefix) == 0 {
continue