Skip to content

http.cookies should mention that samesite=None is valid as per RFC6265bis #136992

@schlenk

Description

@schlenk

Documentation

The http.cookies.rst mentions this:

The attribute :attr:samesite specifies that the browser is not allowed to send the cookie along with cross-site requests. This helps to mitigate CSRF attacks. Valid values for this attribute are "Strict" and "Lax".

But the samesite spec now also allows "None" and the code already allows it.

>>> import http.cookies
>>> sk = http.cookies.SimpleCookie()
>>> sk['test'] = ''
>>> sk['test']['samesite'] = 'None'
>>> sk.output()
'Set-Cookie: test=""; SameSite=None'

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy