You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when the project deployed on Vercel with production environment variables, the callback not able to Set-Cookie, there show Invalid cookie on Chrome browser, and I counted the length of Set-Cookie was exceeded CHUNK_BYTE_SIZE=4000 :
This issue caused by the chunking function, Set-Cookie including session chunk and cookie attributes, but the chunking logic was only take account to the session value length.
Reproduction
Just like the example with the env variables below:
Hi @indiejoseph - yep as you point out, the reproduction example creates the following cookie:
'ec.0=[... a 4kb string ...]; Domain=.abc.com; Path=/; Expires=Thu, 18 Feb 2021 07:36:02 GMT; HttpOnly; Secure; SameSite=Strict;'
Which, minus the value, is 105 ASCII characters (= 105 Bytes). So with the value of 4KB - this becomes 4105 Bytes, which goes over the 4096 Byte limit in Chrome.
I'll raise a PR shortly to reduce the Chunk size (or possibly try and take the cookie property's length into account)
Description
However, when the project deployed on Vercel with production environment variables, the callback not able to Set-Cookie, there show Invalid cookie on Chrome browser, and I counted the length of Set-Cookie was exceeded
CHUNK_BYTE_SIZE=4000
:This issue caused by the chunking function,
Set-Cookie
including session chunk and cookie attributes, but the chunking logic was only take account to the session value length.Reproduction
Just like the example with the env variables below:
Environment
Version: v1.0.0
Chrome: 88
The text was updated successfully, but these errors were encountered: