Oversize Cookie Alert
Cookies cannot be larger than 4kb
This commit is contained in:
parent
89ba1d813a
commit
3379e05fec
@ -255,6 +255,10 @@ func (p *OAuthProxy) MakeCookie(req *http.Request, value string, expiration time
|
|||||||
|
|
||||||
if value != "" {
|
if value != "" {
|
||||||
value = cookie.SignedValue(p.CookieSeed, p.CookieName, value, now)
|
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{
|
return &http.Cookie{
|
||||||
Name: p.CookieName,
|
Name: p.CookieName,
|
||||||
|
Loading…
Reference in New Issue
Block a user