mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Merge pull request #2044 from filebrowser/security_fix
This commit is contained in:
commit
0523b31b96
@ -53,9 +53,11 @@ func (e extractor) ExtractToken(r *http.Request) (string, error) {
|
||||
return auth, nil
|
||||
}
|
||||
|
||||
cookie, _ := r.Cookie("auth")
|
||||
if cookie != nil && strings.Count(cookie.Value, ".") == 2 {
|
||||
return cookie.Value, nil
|
||||
if r.Method == http.MethodGet {
|
||||
cookie, _ := r.Cookie("auth")
|
||||
if cookie != nil && strings.Count(cookie.Value, ".") == 2 {
|
||||
return cookie.Value, nil
|
||||
}
|
||||
}
|
||||
|
||||
return "", request.ErrNoTokenInRequest
|
||||
|
Loading…
Reference in New Issue
Block a user