bug #39261 [Security] fix #39249, default entry_point compiler pass was returning too early (romaricdrigon)

This PR was merged into the 5.2 branch.

Discussion
----------

[Security] fix #39249, default entry_point compiler pass was returning too early

| Q             | A
| ------------- | ---
| Branch?       | 5.2 (bug introduced in 5.2.0, after RC2)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39249
| License       | MIT
| Doc PR        | N/A

A `return` instead of `continue` was making compiler pass return after the first firewall. Hence subsequents firewalls never had a default entrypoint set.
This issue would occur with all firewalls, with any type of authenticator, though I saw it first with `http_basic` - because it is a bit more opaque and harder to debug.

Commits
-------

c3778050bd [Security] fix #39249, default entry_point compiler pass was returning too early
This commit is contained in:
Robin Chalas 2020-12-01 10:40:15 +01:00
commit 0b48115fed

View File

@ -50,7 +50,7 @@ class RegisterEntryPointPass implements CompilerPassInterface
} }
if (!$entryPoints) { if (!$entryPoints) {
return; continue;
} }
$config = $container->getDefinition('security.firewall.map.config.'.$firewallName); $config = $container->getDefinition('security.firewall.map.config.'.$firewallName);