Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
internationalize password requirements
Joel Biddlebe08417c8bbd
diff --git a/frontend/src/components/utilities/checks/PasswordCheck.ts b/frontend/src/components/utilities/checks/PasswordCheck.tsindex be0a275f40..88b1394a18 100644--- a/frontend/src/components/utilities/checks/PasswordCheck.ts+++ b/frontend/src/components/utilities/checks/PasswordCheck.ts@@ -70,7 +70,11 @@ const passwordCheck = async ({}// specialChar- if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) {+ if (+ !/[!@#$%^&*(),.?":{}|<>\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}\p{Script=Arabic}\p{Script=Cyrillic}\p{Script=Cyrillic_Supplement}\p{Script=Cyrillic_Extended_A}\p{Script=Cyrillic_Extended_B}\p{Script=Cyrillic_Extended_C}\p{Script=Cyrillic_Extended_D}\p{Script=Ukrainian}\p{Script=Farsi}\p{Emoji}]/u.test(+ password+ )+ ) {setPasswordErrorSpecialChar(true);errorCheck = true;} else {diff --git a/frontend/src/components/utilities/checks/checkPassword.ts b/frontend/src/components/utilities/checks/checkPassword.tsindex aaa8bac7fb..15393d79d6 100644--- a/frontend/src/components/utilities/checks/checkPassword.ts+++ b/frontend/src/components/utilities/checks/checkPassword.ts@@ -43,7 +43,7 @@ const checkPassword = async ({ password, setErrors }: CheckPasswordParams): Promerrors.tooShort = "at least 14 characters";}- // toolong+ // tooLongif (password.length > 100) {errors.tooLong = "at most 100 characters";}@@ -64,8 +64,13 @@ const checkPassword = async ({ password, setErrors }: CheckPasswordParams): Prom}// specialChar- if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) {- errors.specialChar = "at least 1 special character (!@#$%^&*(),.?)";+ if (+ !/[!@#$%^&*(),.?":{}|<>\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}\p{Script=Arabic}\p{Script=Cyrillic}\p{Script=Cyrillic_Supplement}\p{Script=Cyrillic_Extended_A}\p{Script=Cyrillic_Extended_B}\p{Script=Cyrillic_Extended_C}\p{Script=Cyrillic_Extended_D}\p{Script=Ukrainian}\p{Script=Farsi}\p{Emoji}]/u.test(+ password+ )+ ) {+ errors.specialChar =+ 'at least 1 special character (!@#$%^&*(),.?":{}|<>), Japanese, Korean, Arabic, Cyrillic, Ukrainian, Farsi, or an emoji';}// repeatedChar@@ -76,7 +81,7 @@ const checkPassword = async ({ password, setErrors }: CheckPasswordParams): Prom// breachedPasswordif (await checkIsPasswordBreached(password)) {errors.isBreachedPassword =- "The password you provided is in a list of passwords commonly used on other websites. Please try again with a stronger password.";+ "The provided password is in a list of passwords commonly used on other websites. Please try again with a stronger password.";}setErrors(errors);