Commit 2a3bb653 authored by Dave Marshall's avatar Dave Marshall

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

parent 7edee881
...@@ -219,7 +219,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -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) { $app['security.authentication_providers'] = array_map(function ($provider) use ($app) {
...@@ -227,7 +227,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -227,7 +227,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}, $providers); }, $providers);
$map = new FirewallMap(); $map = new FirewallMap();
foreach ($configs as $config) { foreach ($configs as $name => $config) {
$map->add( $map->add(
is_string($config[0]) ? new RequestMatcher($config[0]) : $config[0], is_string($config[0]) ? new RequestMatcher($config[0]) : $config[0],
array_map(function ($listener) use ($app) { return $app[$listener]; }, $config[1]), 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