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

[HttpFoundation] Allow set 'None' on samesite cookie flag #31475

Merged
merged 1 commit into from May 11, 2019

Conversation

markitosgv
Copy link
Contributor

Allow set samesite cookie flag to 'None' value

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #31467
License MIT

Google introduces new Chrome policy, marking all none setted samesite flag to 'Strict' by default. If you want to allow third party cookies you must set samesite flag to None.

This PR fixes #31467, allow to put samesite Cookie flag to None.

Allow set samesite cookie flag to 'None' value
@markitosgv markitosgv changed the title Allow set 'None' on samesite cookie flag [HttpFoundation] Allow set 'None' on samesite cookie flag May 10, 2019
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 11, 2019
@nicolas-grekas
Copy link
Member

Thank you @markitosgv.

@nicolas-grekas nicolas-grekas merged commit 8bac3d6 into symfony:3.4 May 11, 2019
nicolas-grekas added a commit that referenced this pull request May 11, 2019
…(markitosgv)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Allow set 'None' on samesite cookie flag

Allow set samesite cookie flag to 'None' value

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31467
| License       | MIT

Google introduces new Chrome policy, marking all none setted samesite flag to 'Strict' by default. If you want to allow third party cookies you must set samesite flag to None.

This PR fixes #31467, allow to put samesite Cookie flag to None.

Commits
-------

8bac3d6 Allow set 'None' on samesite cookie flag
This was referenced May 22, 2019
MKodde added a commit to OpenConext/Stepup-Azure-MFA that referenced this pull request Mar 10, 2020
The php session cookie should not have the samesite lax or strict
setting. As this would prevent the session cookie from being present
when the remote azure mfa idp sends back a SAML response.

So it is set to the for now advisable 'none' setting. Combined with the
secure setting, this will be accepted by modern browsers.

See:
https://www.pivotaltracker.com/story/show/171721565
symfony/symfony#31475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants