bpo-29613: Added support for SameSite cookies by alex · Pull Request #6413 · python/cpython

@alex

@akash0x53 @alex

And suggestions by members.

@akash0x53 @alex

@akash0x53 @alex

@akash0x53 @alex

@akash0x53 @alex

@akash0x53 @alex

@akash0x53 @alex

@alex

@alex

@alex alex mentioned this pull request

Apr 7, 2018

timgraham

setting them.

.. versionchanged:: 3.8
Added support for :attr:`samesite` attribute.

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

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

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')

def test_samesite_attrs(self):
samesite_values = ['Strict', 'Lax']

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

@alex

Thanks! Feedback addressed

dstufft

@alex alex deleted the samesite-cookies branch

April 7, 2018 20:09

@alex

@minrk minrk mentioned this pull request

Jan 18, 2019