Skip to content

Update the default cookie_secure value in framework.rst #14999

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

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

tamcy
Copy link
Contributor

@tamcy tamcy commented Feb 18, 2021

Auto-secure cookies was introduced in Symfony 4.2. In Symfony 4.4, according to the Framework Configuration Reference, the default value for cookie_secure is 'auto'. "Auto" means that the framework will set the cookie_secure flag to true when the traffic is sent through HTTPS, or false otherwise.

Since 5.0, the value for this "auto" behavior is changed to null according to the Framework Configuration Reference documentation (the doc change happened somewhere in Jan 2020, I could not pinpoint the exact commit that caused this though). That said, I can still find "auto" being mentioned in the session documentation. It is still the default configuration value of a new Symfony 5.2 project. Also, in the Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration class, I can see that "auto" (but not null) being one of the allowed values.

So, I believe the behavior in the framework hasn't been changed, and the documentation change in framework.rst was not an intentional one. This PR updates the current framework.rst with the correct value.

The default and special `cookie_secure` value should be `'auto'`, not `null`.
@javiereguiluz
Copy link
Member

javiereguiluz commented Feb 19, 2021

Good catch! I checked the source code and, as you said, this was always true, false "auto" in all versions, from 4.4 to 5.2 and 5.x. So, let's merge this. Thanks ... and congrats on your first Symfony Docs contribution!

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.

3 participants