Skip to content

Commit

Permalink
Fix check for exception details in Auth::verifyChallenge as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Oct 18, 2022
1 parent bf5b973 commit 94a9abd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cms/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,9 @@ class_exists(static::$challenges[$challenge]) === true &&

throw new LogicException('Invalid authentication challenge: ' . $challenge);
} catch (Throwable $e) {
if (($e->getDetails()['reason'] ?? null) !== 'rate-limited') {
$details = is_a($e, 'Kirby\Exception\Exception') === true ? $e->getDetails() : [];

if (($details['reason'] ?? null) !== 'rate-limited') {
$this->track($email);
}

Expand Down

0 comments on commit 94a9abd

Please sign in to comment.