summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Westphal <westphal@secure-net-concepts.de>2011-10-30 18:25:26 +0100
committerHenrik Westphal <westphal@secure-net-concepts.de>2011-10-30 18:25:26 +0100
commit34a3094f189524cfc99ad26126088eca6cbdc67e (patch)
tree8bf4b91d5fc9568501f2f0f6a40cb6164a740480
parent6c1ff178df0f187b520adfa238c4aa2d91d3a928 (diff)
downloadsymfony-security-34a3094f189524cfc99ad26126088eca6cbdc67e.zip
symfony-security-34a3094f189524cfc99ad26126088eca6cbdc67e.tar.gz
symfony-security-34a3094f189524cfc99ad26126088eca6cbdc67e.tar.bz2
Redirect to default_target_path if use_referer is true and the referer is the login_path.
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 5270e8d..9f91a39 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -273,7 +273,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
return $targetUrl;
}
- if ($this->options['use_referer'] && $targetUrl = $request->headers->get('Referer')) {
+ if ($this->options['use_referer'] && ($targetUrl = $request->headers->get('Referer')) && $targetUrl !== $request->getUriForPath($this->options['login_path'])) {
return $targetUrl;
}