git.iko.soy/typeable/oauth2-proxy
on master help sign in
Fix cookie split should account for cookie name
commit714e2bdfba4d0af0a607a44432c985c6ea575d63 authorJoel Speed <Joel.speed@hotmail.co.uk> dateWed 20 Jun 2018, 14:56 (8 years ago) parentd4b588d
1 file changed+1−1
oauthproxy.go+1−1
oauthproxy.go+1−1
@@ -291,7 +291,7 @@ func (p *OAuthProxy) MakeSessionCookie(req *http.Request, value string, expirati
291291 value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
292292 }
293293 c := p.makeCookie(req, p.CookieName, value, expiration, now)
294− if len(c.Value) > 4096 {
294+ if len(c.Value) > 4096-len(p.CookieName) {
295295 return splitCookie(c)
296296 }
297297 return []*http.Cookie{c}