cyclone
cyclone copied to clipboard
Invalid cookies if present are silently ignored
tornado fixes this issue in https://github.com/tornadoweb/tornado/pull/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.