mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:00:55 +00:00
beego: fixed serious Directory Traversal
This commit is contained in:
parent
4124760706
commit
18fee2ad9a
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user