-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Renamed key to secret Part 2 #16493
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
24388ea
to
55f59d5
Compare
Test failures seem unrelated |
ping @symfony/deciders This should definitely make it into the first beta/RC of 2.8 |
👍 (tests are green now) |
@@ -58,10 +58,26 @@ public function getKey() | |||
public function addConfiguration(NodeDefinition $node) | |||
{ | |||
$node | |||
->beforeNormalization() | |||
->ifTrue(function ($v) { return isset($v['key']); }) |
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.
array_key_exist
may be better, to acount for null
values (otherwise they would not trigger the BC layer and then be reported as invalid keys).
I'm not sure it is necessary for this particular case though, as empty values are not allowed for the secret, and so no existing (working) project can have null
in this setting. But we may need to check other places
Thank you @wouterj. |
This PR was merged into the 2.8 branch. Discussion ---------- [Security] Renamed key to secret Part 2 Anonymous and RememberMe were already changed in #15141 This PR renames 2 more occurences of key in the Security: AnonymousAuthenticationListener and the Digest entry point. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 55f59d5 Renamed key to secret
This PR was merged into the 2.8 branch. Discussion ---------- [2.8] Document some Security changes | Q | A | --- | --- | Doc fix? | no | New docs? | yes (symfony/symfony#15131, symfony/symfony#16493, symfony/symfony#15151 | Applies to | 2.8+ | Fixed tickets | - Commits ------- 0526ca0 Document deprecation of supports{Attribute,Class}() methods 22026ee Document Security key to secret renamings 4036d26 Use new Simple{Form,Pre}AuthenticatorInterface namespaces
…ryPoint::getKey() in DigestAuthenticationListener (Maxime STEINHAUSSER) This PR was squashed before being merged into the 2.8 branch (closes #19307). Discussion ---------- [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Fix the following deprecation triggered by Symfony when using the `http_digest` authentication: <details> <summary>Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint::getKey() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead. </summary> > DigestAuthenticationEntryPoint::getKey() (called from DigestAuthenticationListener.php at line 81) DigestAuthenticationListener::handle() (called from classes.php at line 2622) Firewall::onKernelRequest() call_user_func() (called from WrappedListener.php at line 61) WrappedListener::__invoke() call_user_func() (called from classes.php at line 1858) EventDispatcher::doDispatch() (called from classes.php at line 1773) EventDispatcher::dispatch() (called from TraceableEventDispatcher.php at line 140) TraceableEventDispatcher::dispatch() (called from HttpKernel.php at line 125) HttpKernel::handleRaw() (called from HttpKernel.php at line 64) HttpKernel::handle() (called from ContainerAwareHttpKernel.php at line 69) ContainerAwareHttpKernel::handle() (called from Kernel.php at line 193) Kernel::handle() (called from app_dev.php at line 36) </details> Refs: #16493 Commits ------- 880a392 [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener
Anonymous and RememberMe were already changed in #15141 This PR renames 2 more occurences of key in the Security: AnonymousAuthenticationListener and the Digest entry point.