Skip to content
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

Add support for SameSite=X & __Secure- / __Host- prefixes #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 6, 2022

  1. Add support for SameSite=X & __Secure- / __Host- prefixes

    Currently if a site specifies SameSite=None in the cookie, it will be
    lost when HTTP::Cookie.parse parses it.
    
    This PR adds support for parsing, preserving and restoring, via
    HTTP::Cookie#set_cookie_value the SameSite=X attribute.
    
    It also respects the __Secure- and __Host- prefixes and rejects cookies
    that violate the spec.
    
    Sources:
     - https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#samesite_attribute
     - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#cookie_prefixes
     - https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes
    geoffyoungs committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    4005a21 View commit details
    Browse the repository at this point in the history