Преглед изворни кода

[Security] Only redirect to urls called with http method GET

Uwe Jäger пре 13 година
родитељ
комит
3ce8227a9b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

+ 1 - 1
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());
         }
     }