Error is thrown when a cookie cannot be decoded even if it is one not used by payload
Describe the Bug
The code in https://github.com/payloadcms/payload/blob/d55b6a3db95edd78c230a82553484df437435151/packages/payload/src/utilities/parseCookies.ts#L14 throws an error if a cookie cannot be decoded. I have Authelia set up and therefore an additional cookie is sent with each request. This cookie cannot be decoded by the function in the code. Therefore an error is thrown and the administration interface is unusable. Probably the API too.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload/blob/d55b6a3db95edd78c230a82553484df437435151/packages/payload/src/utilities/parseCookies.ts#L14
Reproduction Steps
There is no specific setup which triggers this issue, so I cannot provide a "reproduction".
- Try to login into payload administration section.
- Does not login, server shows error thrown in https://github.com/payloadcms/payload/blob/d55b6a3db95edd78c230a82553484df437435151/packages/payload/src/utilities/parseCookies.ts#L14
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
Payload: 3.9.0,
Node.js: 22.6.0
Next.js: 15.0.4
Is there anything I can do to get this fixed? It is really annoying not being able to login. 🙁
I created a pull request https://github.com/payloadcms/payload/pull/12515 to fix this
Issue resolved by this PR.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.