Commit 0ae6c1e9 authored by Fabien Potencier's avatar Fabien Potencier

merged branch davedevelopment/security-exception-listener (PR #395)

Commits
-------

2a3bb653 Tie configs to firewall name to ensure correct exception listener is used

Discussion
----------

Tie configs to firewall name to ensure correct exception listener is used

Without this, the last declared firewall's exception listener is used for all firewalls
parents 7edee881 2a3bb653
......@@ -219,7 +219,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}
}
$configs[] = array($pattern, $listeners, $protected);
$configs[$name] = array($pattern, $listeners, $protected);
}
$app['security.authentication_providers'] = array_map(function ($provider) use ($app) {
......@@ -227,7 +227,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}, $providers);
$map = new FirewallMap();
foreach ($configs as $config) {
foreach ($configs as $name => $config) {
$map->add(
is_string($config[0]) ? new RequestMatcher($config[0]) : $config[0],
array_map(function ($listener) use ($app) { return $app[$listener]; }, $config[1]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment