1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 03:30:57 +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 { 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 { for prefix, staticDir := range StaticDir {
if len(prefix) == 0 { if len(prefix) == 0 {
continue continue