[SecurityBundle] Only throw exception if check_path looks like an url

This commit is contained in:
Henrik Bjørnskov 2011-12-30 20:00:08 +01:00
parent d12f5b202c
commit c37c14528e

View File

@ -273,7 +273,7 @@ class MainConfiguration implements ConfigurationInterface
continue;
}
if (!preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
if (false !== strpos('/', $firewall[$k]['check_path']) && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
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']));
}
}