Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
Fix cookie split should account for cookie name
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelSpeed committed Jun 21, 2018
1 parent 19f53ae commit 905d9f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (p *OAuthProxy) MakeSessionCookie(req *http.Request, value string, expirati
value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
}
c := p.makeCookie(req, p.CookieName, value, expiration, now)
if len(c.Value) > 4096 {
if len(c.Value) > 4096-len(p.CookieName) {
return splitCookie(c)
}
return []*http.Cookie{c}
Expand Down

0 comments on commit 905d9f0

Please sign in to comment.