Check email validity on all requests rather than only on login/refresh

This commit is contained in:
mattk42 2015-07-14 08:40:59 -06:00
parent 3a792555f1
commit 6cd3e72e09

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