Skip to content

Commit 0663036

Browse files
Merge branch '3.4' into 4.0
* 3.4: [Routing] Fix throwing NoConfigurationException instead of 405 [Security] Load the user before pre/post auth checks when needed [SecurityBundle] Add test for simple authentication config [WebProfilerBundle] fix version check [SecurityBundle] Add missing argument to security.authentication.provider.simple [Finder] fix tests
2 parents ca780c8 + 50f333b commit 0663036

File tree

11 files changed

+26
-11
lines changed

11 files changed

+26
-11
lines changed

Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private function compileRoutes(RouteCollection $routes, $supportsRedirections)
154154
}
155155

156156
// used to display the Welcome Page in apps that don't define a homepage
157-
$code .= " if ('/' === \$pathinfo) {\n";
157+
$code .= " if ('/' === \$pathinfo && !\$allow) {\n";
158158
$code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n";
159159
$code .= " }\n";
160160

@@ -362,7 +362,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren
362362
EOF;
363363
}
364364
} elseif ($methods) {
365-
$code .= <<<EOF
365+
$code .= <<<EOF
366366
if (!in_array($methodVariable, array('$methods'))) {
367367
\$allow = array_merge(\$allow, array('$methods'));
368368
goto $gotoname;

Matcher/UrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function match($pathinfo)
7676
return $ret;
7777
}
7878

79-
if ('/' === $pathinfo) {
79+
if ('/' === $pathinfo && !$this->allow) {
8080
throw new NoConfigurationException();
8181
}
8282

Tests/Fixtures/dumper/url_matcher0.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function match($rawPathinfo)
2828
$canonicalMethod = 'GET';
2929
}
3030

31-
if ('/' === $pathinfo) {
31+
if ('/' === $pathinfo && !$allow) {
3232
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
3333
}
3434

Tests/Fixtures/dumper/url_matcher1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function match($rawPathinfo)
309309

310310
}
311311

312-
if ('/' === $pathinfo) {
312+
if ('/' === $pathinfo && !$allow) {
313313
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
314314
}
315315

Tests/Fixtures/dumper/url_matcher2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public function match($rawPathinfo)
371371
}
372372
not_nonsecure:
373373

374-
if ('/' === $pathinfo) {
374+
if ('/' === $pathinfo && !$allow) {
375375
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
376376
}
377377

Tests/Fixtures/dumper/url_matcher3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function match($rawPathinfo)
4646
return array('_route' => 'with-condition');
4747
}
4848

49-
if ('/' === $pathinfo) {
49+
if ('/' === $pathinfo && !$allow) {
5050
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
5151
}
5252

Tests/Fixtures/dumper/url_matcher4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function match($rawPathinfo)
103103

104104
}
105105

106-
if ('/' === $pathinfo) {
106+
if ('/' === $pathinfo && !$allow) {
107107
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
108108
}
109109

Tests/Fixtures/dumper/url_matcher5.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function match($rawPathinfo)
200200

201201
}
202202

203-
if ('/' === $pathinfo) {
203+
if ('/' === $pathinfo && !$allow) {
204204
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
205205
}
206206

Tests/Fixtures/dumper/url_matcher6.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function match($rawPathinfo)
204204

205205
}
206206

207-
if ('/' === $pathinfo) {
207+
if ('/' === $pathinfo && !$allow) {
208208
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
209209
}
210210

Tests/Fixtures/dumper/url_matcher7.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public function match($rawPathinfo)
240240

241241
}
242242

243-
if ('/' === $pathinfo) {
243+
if ('/' === $pathinfo && !$allow) {
244244
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
245245
}
246246

0 commit comments

Comments
 (0)