From 1b23671812ef736de809a961adfca3f3a69889b2 Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Wed, 9 Nov 2022 12:42:30 +0000 Subject: [PATCH] Update password length requirement to 8 characters (#5438) --- apps/web/public/static/locales/en/common.json | 2 +- packages/lib/auth.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index c8d458710b..c486e328ce 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -417,7 +417,7 @@ "forgotten_secret_description": "If you have lost or forgotten this secret, you can change it, but be aware that all integrations using this secret will need to be updated", "current_incorrect_password": "Current password is incorrect", "password_hint_caplow": "Mix of uppercase & lowercase letters", - "password_hint_min": "Minimum 7 characters long", + "password_hint_min": "Minimum 8 characters long", "password_hint_num": "Contain at least 1 number", "invalid_password_hint": "The password must be a minimum of 7 characters long containing at least one number and have a mixture of uppercase and lowercase letters", "incorrect_password": "Password is incorrect.", diff --git a/packages/lib/auth.ts b/packages/lib/auth.ts index 931df569e2..2535b0f15f 100644 --- a/packages/lib/auth.ts +++ b/packages/lib/auth.ts @@ -42,8 +42,8 @@ export function isPasswordValid(password: string, breakdown?: boolean) { let cap = false, // Has uppercase characters low = false, // Has lowercase characters num = false, // At least one number - min = false; // Seven characters - if (password.length > 6) min = true; + min = false; // Eight characters + if (password.length > 7) min = true; for (let i = 0; i < password.length; i++) { if (!isNaN(parseInt(password[i]))) num = true; else {