Skip to content
Snippets Groups Projects

Second parameter should be user-provided value

Open Pierre Rudloff requested to merge issue/drupal-3491402:3491402-bad-usage-of into 11.x
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -342,7 +342,7 @@ protected function determineErrorRedirect(?UserInterface $user, int $timestamp,
protected function validatePathParameters(UserInterface $user, int $timestamp, string $hash, int $timeout = 0): bool {
$current = \Drupal::time()->getRequestTime();
$timeout_valid = ((!empty($timeout) && $current - $timestamp < $timeout) || empty($timeout));
return ($timestamp >= $user->getLastLoginTime()) && $timestamp <= $current && $timeout_valid && hash_equals($hash, user_pass_rehash($user, $timestamp));
return ($timestamp >= $user->getLastLoginTime()) && $timestamp <= $current && $timeout_valid && hash_equals(user_pass_rehash($user, $timestamp), $hash);
}
/**
Loading