mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix unsecure redirect code.
This commit is contained in:
@@ -183,7 +183,7 @@ trait UserNavigation
|
||||
// get host of previous URL:
|
||||
$previous = parse_url($return, PHP_URL_HOST);
|
||||
|
||||
if ($default === $previous && (null === $errors || (0 === $errors->count())) && !Str::contains($return, $forbidden)) {
|
||||
if (null !== $previous && $default === $previous && (null === $errors || (0 === $errors->count())) && !Str::contains($return, $forbidden)) {
|
||||
Log::debug(sprintf('Saving URL %s under key %s', $return, $identifier));
|
||||
session()->put($identifier, $return);
|
||||
|
||||
|
Reference in New Issue
Block a user