-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
bpo-29613: Added support for SameSite cookies #214
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
Changes from 1 commit
ef83909
c8bc135
c064da4
364ea46
c3890a2
6ed3f3f
aa54e50
a6cbc20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,13 +143,13 @@ Morsel Objects | |
in HTTP requests, and is not accessible through JavaScript. This is intended | ||
to mitigate some forms of cross-site scripting. | ||
|
||
The attribute :attr:`samesite` specifies that browser is not allowed to send the | ||
cookie along with cross-site requests. This help to mitigate CSRF attacks. Valid | ||
values for this attribute are "Strict" and "Lax". | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the meaning of these values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explaining the values would be out of scope of the Python documentation. I think invalid values should be accepted, after all its browser's job to discard invalid values. Suppose, in future they proposed or added another value for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tim is correct that we need to add a test for invalid values. However, we need to decide on what we should do with invalid values first. I don't have time to do a research at the moment, but just a note that Firefox doesn't implement SameSite support yet: https://bugzilla.mozilla.org/show_bug.cgi?id=795346 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. However, chrome implemented SamSite. Right now only Chrome implemented this. https://bugs.chromium.org/p/chromium/issues/detail?id=459154 I messed with this branch :( Should I open new PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should be able to fix the branch by rebasing and force pushing. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add below this line:
Thanks @alex for the clarification about this :) |
||
.. versionchanged:: 3.7 | ||
Added support for :attr:`samesite` attribute. | ||
|
||
The attribute :attr:`samesite` specifies that browser is not allowed to send the | ||
cookie along with cross-site requests. This help to mitigate CSRF attacks. Valid | ||
values for this attribute are "Strict" and "Lax". | ||
|
||
The keys are case-insensitive and their default value is ``''``. | ||
|
||
.. versionchanged:: 3.5 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helps