Skip to content

Conversation

@alex
Copy link
Member

@alexalex commented Apr 7, 2018

setting them.

.. versionchanged:: 3.8
Added support for :attr:`samesite` attribute.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the browser"

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help -> helps

'Set-Cookie: Customer="WILE_E_COYOTE" HttpOnly; Secure')

deftest_samesite_attrs(self):
samesite_values= ['Strict', 'Lax']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might add tests for 'strict' and 'lax' as the values are case-insensitive from what I read.

@alex
Copy link
MemberAuthor

alex commented Apr 7, 2018

Thanks! Feedback addressed

@alexalex merged commit c87eb09 into python:masterApr 7, 2018
@alexalex deleted the samesite-cookies branch April 7, 2018 20:09
@alex
Copy link
MemberAuthor

alex commented Apr 7, 2018

@akash0x53 I would encourage you to apply for a Google Patch Reward for your work on this: https://www.google.com/about/appsecurity/patch-rewards/

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@alex@dstufft@timgraham@the-knights-who-say-ni@bedevere-bot@akash0x53