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

Oversize Cookie Alert #346

Merged
merged 1 commit into from
Mar 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,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