From c0a92657515c90ca549fe14894cbe65a1ac99cc0 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 18 Oct 2022 10:52:49 +0200 Subject: [PATCH] Fix check for exception details in Auth::verifyChallenge as well --- src/Cms/Auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }