git.iko.soy/typeable/oauth2-proxy
on master help sign in
Merge pull request #346 from bdwyertech/patch-1

Oversize Cookie Alert

commit107b4811b4168b800b59db55c6bff70463b8a41a authorJehiah Czebotar <jehiah@gmail.com> dateTue 28 Mar 2017, 21:40 (10 years ago) parentcd0d13e3379e05
1 file changed+4
oauthproxy.go+4
oauthproxy.go+4
@@ -257,6 +257,10 @@ func (p *OAuthProxy) MakeCookie(req *http.Request, value string, expiration time
257257
258258 if value != "" {
259259 value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
260+ if len(value) > 4096 {
261+ // Cookies cannot be larger than 4kb
262+ log.Printf("WARNING - Cookie Size: %d bytes", len(value))
263+ }
260264 }
261265 return &http.Cookie{
262266 Name: p.CookieName,