소스 검색

Fix for using route name as check_path.

Johannes 13 년 전
부모
커밋
0024ddce9c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

+ 1 - 1
src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

@@ -274,7 +274,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']));
                         }
                     }