-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: cookie string parsing incorrectly handles attributes without values #3023
Comments
I imagine simply swapping Line 59 in 3dfd6fe
connection.cookies so I assume that's not a valid way to fix it, although that format would match the way these attributes work more.What about (cookie, cookie) ? Can't think of anything else that'd be simple and keeps the signature.
|
For the 'else' clause right? Sounds right to me. |
This seems to have been closed on accident as PR #3035 was merged and incorrectly linked to this issue. #3034 is still pending to resolve this issue, should I open a new bug report or is there a way to "unlink" and re-open this one? Or just leave as-is now? @provinzkraut |
Should be fixed now |
Description
The
parse_cookie_string()
function incorrectly handles attributes without values and will keep only one due to the dictionary conversion.For example if the cookie contains the
HttpOnly
and theSecure
attributes these will both have an empty string as key and eventually only one of these will be returned.URL to code causing the issue
litestar/litestar/_parsers.py
Lines 50 to 67 in 3dfd6fe
MCVE
No response
Steps to reproduce
No response
Screenshots
No response
Logs
No response
Litestar Version
v2.5.1
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: