if (\
is_string($targetUrl) && (str_starts_with($targetUrl, '/'
) ||
str_starts_with($targetUrl, 'http'
))) { return $targetUrl;
} if ($this->logger &&
$targetUrl) { $this->logger->
debug(sprintf('Ignoring query parameter "%s": not a valid URL.',
$this->options
['target_path_parameter'
]));
} $firewallName =
$this->
getFirewallName();
if (null !==
$firewallName && !
$request->attributes->
getBoolean('_stateless'
) &&
$targetUrl =
$this->
getTargetPath($request->
getSession(),
$firewallName)) { $this->
removeTargetPath($request->
getSession(),
$firewallName);
return $targetUrl;
} if ($this->options
['use_referer'
] &&
$targetUrl =
$request->headers->
get('Referer'
)) { if (false !==
$pos =
strpos($targetUrl, '?'
)) { $targetUrl =
substr($targetUrl, 0,
$pos);
} if ($targetUrl &&
$targetUrl !==
$this->httpUtils->
generateUri($request,
$this->options
['login_path'
])) { return $targetUrl;
} }