From 94a9abdfc20f1e98adb9e8696910fcd1f1d6dd99 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 18 Oct 2022 10:45:15 +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 8f6d31e862..28d9f36e28 100644 --- a/src/Cms/Auth.php +++ b/src/Cms/Auth.php @@ -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); }