Skip to content
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

Invalid cookies if present are silently ignored #193

Open
shasts opened this issue Oct 13, 2020 · 0 comments
Open

Invalid cookies if present are silently ignored #193

shasts opened this issue Oct 13, 2020 · 0 comments

Comments

@shasts
Copy link

shasts commented Oct 13, 2020

tornado fixes this issue in tornadoweb#1852.
Python 3.8 cookie parsing is still "broken".

from http import cookies as http_cookies
cookies = http_cookies.SimpleCookie()
cookies.load('first=aaa; lt-session-data={"id":"0.3826a069174c085cb71","lastUpdatedDate":"2020-09-24T14:30:27.954Z"}; second=xxxx')
print(cookies)

Above snippet outputs: Set-Cookie: first=aaa.

cyclone is also affected by this bug. If there is an invalid cookie in the middle of ; separated cookies, the cookies after the invalid one are not available in the RequestHandler.cookies list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant