From 18fee2ad9a7ea4b67f13aa908814ee7379303801 Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 8 Apr 2014 17:43:25 +0800 Subject: [PATCH] beego: fixed serious Directory Traversal --- staticfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticfile.go b/staticfile.go index c248135c..e140ed38 100644 --- a/staticfile.go +++ b/staticfile.go @@ -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