8000 merged branch johannes85/2.0 (PR #3791) · phreaknerd/symfony@57990cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 57990cc

Browse files
committed
merged branch johannes85/2.0 (PR symfony#3791)
Commits ------- 0024ddc Fix for using route name as check_path. Discussion ---------- Security Bundle route as check_path In the current 2.0 branch you can't use a route as firewalls: admin_area: login_path: you will get a InvalidConfigurationException. In the 2.1 version this is fixed. Since 2.1 isn't released i think this fix should be merged into the 2.0 branch too. Many people have this problem (schmittjoh/JMSI18nRoutingBundle#7) for example which effectively blocks internationalisation in combination with the firewall. --------------------------------------------------------------------------- by stof at 2012-04-10T13:35:13Z @fabpot ping
2 parents 667f8fd + 0024ddc commit 57990cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
274274
continue;
275275
}
276276
277-
if (!preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
277+
if (false !== strpos('/', $firewall[$k]['check_path']) && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
278278
throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern']));
279279
}
280280
}

0 commit comments

Comments
 (0)
0