1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Make ProcessCookie() fail when cookie parse fails

This commit is contained in:
Mike Bland
2015-05-09 16:31:18 -04:00
parent bd4eae8fec
commit 610341a068
2 changed files with 12 additions and 0 deletions

View File

@ -298,6 +298,7 @@ func (p *OauthProxy) ProcessCookie(rw http.ResponseWriter, req *http.Request) (e
}
if err != nil {
log.Printf(err.Error())
ok = false
} else if p.CookieRefresh != time.Duration(0) {
refresh_threshold := time.Now().Add(p.CookieRefresh)
if refresh_threshold.Unix() > timestamp.Unix() {