From 34a3094f189524cfc99ad26126088eca6cbdc67e Mon Sep 17 00:00:00 2001 From: Henrik Westphal Date: Sun, 30 Oct 2011 18:25:26 +0100 Subject: Redirect to default_target_path if use_referer is true and the referer is the login_path. --- Http/Firewall/AbstractAuthenticationListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.1