summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2011-11-14 14:32:22 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-11-14 14:32:22 +0100
commit3841b18484acd18eb20f2b0352c282bf525c9c06 (patch)
tree1cf0417ddd8c7272a7adb1f34a5f3bac8bcfc87c
parent00ce6d50e0756097d92beb627c43b0f15fc38a4b (diff)
parent7f2e3570c00c06f45f9d960986f6096515f8b3f2 (diff)
downloadsymfony-security-3841b18484acd18eb20f2b0352c282bf525c9c06.zip
symfony-security-3841b18484acd18eb20f2b0352c282bf525c9c06.tar.gz
symfony-security-3841b18484acd18eb20f2b0352c282bf525c9c06.tar.bz2
Merge branch '2.0'
* 2.0: [HttpKernel] fixed Content-Length header when using ESI tags (closes #2623) [HttpFoundation] added an exception to MimeTypeGuesser::guess() when no guesser are available (closes #2636) [Security] fixed HttpUtils::checkRequestPath() to not catch all exceptions (closes #2637) [DoctrineBundle] added missing default parameters, needed to setup and use DBAL without ORM [Transation] Fix grammar. [TwigBundle] Fix trace to not show 'in at line' when file/line are empty.
-rw-r--r--Http/HttpUtils.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php
index 57eb6f1..b31fcf5 100644
--- a/Http/HttpUtils.php
+++ b/Http/HttpUtils.php
@@ -16,6 +16,8 @@ use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\RouterInterface;
+use Symfony\Component\Routing\Exception\MethodNotAllowedException;
+use Symfony\Component\Routing\Exception\ResourceNotFoundException;
/**
* Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs.
@@ -108,7 +110,9 @@ class HttpUtils
$parameters = $this->router->match($request->getPathInfo());
return $path === $parameters['_route'];
- } catch (\Exception $e) {
+ } catch (MethodNotAllowedException $e) {
+ return false;
+ } catch (ResourceNotFoundException $e) {
return false;
}
}