Skip to content

SameSite is not set in the default path #256

Closed

Description

@martinlindhe

The SameSite patch in #165 and #170 forgot to initialize SameSite to a value in the default path.

I think the intent was to initialize it to http.SameSiteDefaultMode.

Currently this results in the following error in Firefox Developer Tools

Cookie “id” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite

Activity

  1. changed the title [-][bug] [/-] [+][bug] SameSite is not set in the default path[/+] on Feb 23, 2022
  2. stale commented on Apr 27, 2022

    @stale

    This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.

  3. added and removed on Apr 27, 2022
  4. changed the title [-][bug] SameSite is not set in the default path[/-] [+]SameSite is not set in the default path[/+] on Jul 16, 2023
  5. moved this to 📋 Backlog in Gorilla Web Toolkiton Aug 25, 2023
  6. bharat-rajani commented on Apr 21, 2024

    @bharat-rajani
    Member

    @martinlindhe The http.SameSiteDefaultMode would still result in cookie being dropped because default mode will not add SameSite.

    I am leaning towards defaulting SameSite to http.SameSiteLaxMode inside cookie store initializer (NewCookieStore). Along with this it should be clearly documented through an example that this option is configurable.

    References for my above opinions:

    Expired draft: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-same-site-00#section-3.1
    Currenty active: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-05#section-4.1.1

  7. moved this from 📋 Backlog to ✅ Done in Gorilla Web Toolkiton Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions