From fbf1a211e620eb22a4d6af4e4c4a63a1251eab3c Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:33:43 -0600 Subject: [PATCH] fix loginuserpass error handling for rate limit message --- modules/material/themes/material/silauth/loginuserpass.twig | 2 +- modules/silauth/src/Auth/Source/auth/Authenticator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/material/themes/material/silauth/loginuserpass.twig b/modules/material/themes/material/silauth/loginuserpass.twig index 9b7beb2..7f72eca 100644 --- a/modules/material/themes/material/silauth/loginuserpass.twig +++ b/modules/material/themes/material/silauth/loginuserpass.twig @@ -91,7 +91,7 @@ {% if errorcode ?? '' == 'WRONGUSERPASS' %} {% set errorMessageKey = errorparams[1] ?? '{login:error_wronguserpass}' %} {% set errorMessageTokens = errorparams[2] ?? null %} - {% set message = errorMessageKey|trans({errorMessageKey, errorMessageTokens}) %} + {% set message = errorMessageKey|trans(errorMessageTokens) %}

error diff --git a/modules/silauth/src/Auth/Source/auth/Authenticator.php b/modules/silauth/src/Auth/Source/auth/Authenticator.php index 654c462..7350178 100644 --- a/modules/silauth/src/Auth/Source/auth/Authenticator.php +++ b/modules/silauth/src/Auth/Source/auth/Authenticator.php @@ -325,7 +325,7 @@ protected function setErrorBlockedByRateLimit(WaitTime $waitTime): void } } - $this->setError($errorCode, ['{number}' => $number]); + $this->setError($errorCode, ['%number%' => $number]); } protected function setErrorGenericTryLater(): void