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
I am working on a project where some requests include a base64 encoded cookie. These base64 values contains '=' in the cookie value. Unfortunately, when that is the case, the cookie value made available in req.cookies() is missing any character including and after the '='.
I can push a PR if you are okay with this solution
The text was updated successfully, but these errors were encountered:
qgolsteyn
changed the title
[Bug]: Libraries does not parse cookie values containing '=' correctly
[Bug]: Library does not parse cookie values containing '=' correctly
Jun 1, 2024
First of all, great project!
I am working on a project where some requests include a base64 encoded cookie. These base64 values contains '=' in the cookie value. Unfortunately, when that is the case, the cookie value made available in
req.cookies()
is missing any character including and after the '='.For example, we received a request with header:
lambda-api
will return the following when callingreq.cookies()
:Note the missing '='.
I have identified the issue to https://github.com/jeremydaly/lambda-api/blob/main/lib/request.js#L164. We should split on the first '=' but should join the remaining string together to form the correct cookie value.
So, instead of:
We can do:
I can push a PR if you are okay with this solution
The text was updated successfully, but these errors were encountered: