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 parameters to set samesite for any arbitrary cookie #10342

Open
3 tasks done
GuySartorelli opened this issue May 30, 2022 · 2 comments
Open
3 tasks done

Add parameters to set samesite for any arbitrary cookie #10342

GuySartorelli opened this issue May 30, 2022 · 2 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented May 30, 2022

#10335 introduces configuration to set a default samesite value for cookies, but because of BC concerns we couldn't add parameters to set a specific samesite value for any (separate) given cookie.

Acceptance criteria

  • $sameSite param = '' is added as added to the following:
    • CookieJar::outputCookie()
    • Cookie::set(), Cookie_Backend::set() and CookieJar::set()
    • Cookie::forceExpiry(), Cookie_Backend::forceExpiry() and CookieJar::forceExpiry()?
    • Anywhere else it's needed
  • When the default blank string param is used, fallback to the Cookie.default_samesite configuration variable
  • Session::start() should pass its samesite value into this parameter instead of CookieJar checking the Session.cookie_samesite config.

PRs

Kitchen sink CI run
Note this doesn't include any fixes from silverstripe/.github#376 so some builds may be red
Compare with https://github.com/silverstripe/recipe-kitchen-sink/actions/runs/13821934870

@emteknetnz
Copy link
Member

@GuySartorelli Could you do an updated kitchen sink run

@GuySartorelli
Copy link
Member Author

Nothing relevant changed that would affect sink but I'll do it to avoid ping pong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants