diff --git a/src/Cms/Auth.php b/src/Cms/Auth.php index b1131dfa86..a40216f7a0 100644 --- a/src/Cms/Auth.php +++ b/src/Cms/Auth.php @@ -844,9 +844,11 @@ class_exists(static::$challenges[$challenge]) === true && throw new LogicException('Invalid authentication challenge: ' . $challenge); } catch (Throwable $e) { + $details = is_a($e, 'Kirby\Exception\Exception') === true ? $e->getDetails() : []; + if ( empty($email) === false && - ($e->getDetails()['reason'] ?? null) !== 'rate-limited' + ($details['reason'] ?? null) !== 'rate-limited' ) { $this->track($email); }