-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Hard error on invalid max-age cookie #1810
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is incorrect, please respond with an update. Thank you for your contributions. |
Let's investigate. That PR was several years ago. There was a change to cookies not that long ago, maybe it is a regression? Let's confirm this on both sanic server and ASGI. I'm not at the computer now to check if there are tests for this already or not. |
Looks like for the server we have the tests, but for ASGI don't have. |
Describe the bug
Currently when setting the
max-age
cookie value, it's possible for a valid value to not be set as expected, as well as an invalid value from raising a hard error. In both cases the values are replaced by a0
max-age
.Code snippet
Expected behavior
Here's what I think the expected behaviour should be (akin to how the
expires
cookie attribute is handled; raising an error if not adatetime.datetime
).Environment (please complete the following information):
Additional context
I've created a pull request for this here #1809. Here's the issue relating to the original implementation #1452.
Creating this issue so I can have an issue number for the changelog.
The text was updated successfully, but these errors were encountered: