mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 07:40:49 +00:00
fix read /
This commit is contained in:
parent
6c92ca2a16
commit
624f6258ee
@ -555,7 +555,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
}
|
||||
if strings.HasPrefix(r.URL.Path, prefix) {
|
||||
if len(r.URL.Path) > len(prefix) && r.URL.Path[len(prefix)+1] != '/' {
|
||||
if len(r.URL.Path) > len(prefix) && r.URL.Path[len(prefix)] != '/' {
|
||||
continue
|
||||
}
|
||||
file := path.Join(staticDir, r.URL.Path[len(prefix):])
|
||||
|
Loading…
Reference in New Issue
Block a user