forked from Mirrors/gomuks
server: remove cookie if it's invalid
This commit is contained in:
parent
ad224073fe
commit
8e92d9b163
1 changed files with 4 additions and 0 deletions
|
@ -213,6 +213,10 @@ func (gmx *Gomuks) AuthMiddleware(next http.Handler) http.Handler {
|
|||
ErrMissingCookie.Write(w)
|
||||
return
|
||||
} else if !gmx.validateAuth(authCookie.Value, false) {
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "gomuks_auth",
|
||||
MaxAge: -1,
|
||||
})
|
||||
ErrInvalidCookie.Write(w)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue