1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-28 09:08:44 +02:00

Merge pull request #126 from mattk42/master

Check email validity on all requests rather than only on login.
This commit is contained in:
Jehiah Czebotar 2015-07-14 12:04:44 -04:00
commit 58d2b88406

View File

@ -484,7 +484,7 @@ func (p *OauthProxy) Proxy(rw http.ResponseWriter, req *http.Request) {
}
}
if saveSession && session.Email != "" && !p.Validator(session.Email) {
if session != nil && session.Email != "" && !p.Validator(session.Email) {
log.Printf("%s Permission Denied: removing session %s", remoteAddr, session)
session = nil
saveSession = false