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

Commit

Permalink
Merge pull request #346 from bdwyertech/patch-1
Browse files Browse the repository at this point in the history
Oversize Cookie Alert
  • Loading branch information
jehiah authored Mar 29, 2017
2 parents cd0d13e + 3379e05 commit 107b481
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ func (p *OAuthProxy) MakeCookie(req *http.Request, value string, expiration time

if value != "" {
value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
if len(value) > 4096 {
// Cookies cannot be larger than 4kb
log.Printf("WARNING - Cookie Size: %d bytes", len(value))
}
}
return &http.Cookie{
Name: p.CookieName,
Expand Down

0 comments on commit 107b481

Please sign in to comment.