소스 검색

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