From cc0177a4aa18ff8dbbf16de46251110a0f4d421e Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:12:05 +0000 Subject: [PATCH] Prevent password length error silent truncation (#2364) * Prevent password fields from silently truncating too-long passwords * Use existing i18 translation --------- Co-authored-by: SleeplessOne1917 --- lemmy-translations | 2 +- src/shared/components/common/password-input.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lemmy-translations b/lemmy-translations index 5d4946e5..91563f22 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 5d4946e598630e06b890400ca92696d533ad9edb +Subproject commit 91563f222284e19def549ac5247039b398c78931 diff --git a/src/shared/components/common/password-input.tsx b/src/shared/components/common/password-input.tsx index 20cbadd4..2e338783 100644 --- a/src/shared/components/common/password-input.tsx +++ b/src/shared/components/common/password-input.tsx @@ -97,8 +97,8 @@ class PasswordInput extends Component { onInput={onInput} value={value} required - maxLength={60} - minLength={10} + pattern=".{10,60}" + title={I18NextService.i18n.t("invalid_password")} />