diff --git a/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php b/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php index f61df81128..2d8de37dd4 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php @@ -172,7 +172,7 @@ class ExceptionListener protected function setTargetPath(Request $request) { // session isn't required when using http basic authentication mechanism for example - if ($request->hasSession()) { + if ($request->hasSession() && 'GET' == $request->getMethod()) { $request->getSession()->set('_security.target_path', $request->getUri()); } }