-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* #28446
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
Conversation
ea900dc
to
2c23629
Compare
$rememberMeSecureDefault = false; | ||
$rememberMeSameSiteDefault = null; | ||
|
||
foreach ($container->getExtensions() as $name => $extension) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isset($container->getExtensions()['framework'])) {
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
2c23629
to
c48fbb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing some notes in the changelog files.
As you add support in BrowserKit, shouldn't you also not send the cookie in the request if it is a samesite=strict one and we don't have a request to the same site as the last one in the history ? Otherwise, we don't actually support them. |
At least we can read the response cookie. I agree it would even be better to implement the samesite logic in browserkit. Let's open a separate issue for that? |
ff03aa0
to
9c153e4
Compare
Comments addressed. Status: needs review |
@@ -11,6 +11,9 @@ CHANGELOG | |||
or `Symfony\Component\Security\Core\Authentication\Token\RememberMeToken`. | |||
* Added `Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass` | |||
* Added `json_login_ldap` authentication provider to use LDAP authentication with a REST API. | |||
* Made remember-me cookies inherit their default config from `framework.session.cookie_*` | |||
and added an "auto" mode to their "secure" config option to make them secure on HTTPS automatically. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed thanks :)
… default config from framework.session.cookie_*
9c153e4
to
6ec223b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except the two unrelated changes (src/Symfony/Component/DomCrawler/CHANGELOG.md
and src/Symfony/Component/Finder/CHANGELOG.md
), this look good to me.
Thank you @nicolas-grekas. |
…+ inherit their default config from framework.session.cookie_* (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28338 | License | MIT | Doc PR | - Let's make it easier to have a good default security level, now for the remember-me cookie. Commits ------- 6ec223b [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
Let's make it easier to have a good default security level, now for the remember-me cookie.