summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-07-19 20:51:30 +0200
committerJohannes Schmitt <schmittjoh@gmail.com>2011-07-19 20:51:30 +0200
commitb005f5ce6e2b6aefbe0ae8569b2b8e63dc9a2fa9 (patch)
tree0bf36eac7b2b23a93e571167e9df9d399d2a2a36
parenteb4868879558c1027e9d76153e8cf0382915e7e0 (diff)
downloadsymfony-security-b005f5ce6e2b6aefbe0ae8569b2b8e63dc9a2fa9.zip
symfony-security-b005f5ce6e2b6aefbe0ae8569b2b8e63dc9a2fa9.tar.gz
symfony-security-b005f5ce6e2b6aefbe0ae8569b2b8e63dc9a2fa9.tar.bz2
fixes #1659
-rw-r--r--Http/Firewall/ExceptionListener.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index c757390..46ffde8 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -76,6 +76,11 @@ class ExceptionListener
$exception = $event->getException();
$request = $event->getRequest();
+ // determine the actual cause for the exception
+ while (null !== $previous = $exception->getPrevious()) {
+ $exception = $previous;
+ }
+
if ($exception instanceof AuthenticationException) {
if (null !== $this->logger) {
$this->logger->info(sprintf('Authentication exception occurred; redirecting to authentication entry point (%s)', $exception->getMessage()));