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
Added password criterion support for multiple languages and emojis
Joel Biddleb2888272f215
diff --git a/frontend/public/locales/en/translations.json b/frontend/public/locales/en/translations.jsonindex 8bac300943..0bf36622fa 100644--- a/frontend/public/locales/en/translations.json+++ b/frontend/public/locales/en/translations.json@@ -239,7 +239,7 @@"validate-number": "at least 1 number","validate-special-char": "at least 1 special character","validate-repeated-char": "at most 2 repeated consecutive characters",- "validate-is-breached": "The password you provided is in a list of passwords commonly used on other websites. Please try again with a stronger password."+ "validate-is-breached": "The new password is in a list of passwords commonly used on other websites. Please try again with a stronger password."},"token": {"service-tokens": "Service Tokens",diff --git a/frontend/public/locales/es/translations.json b/frontend/public/locales/es/translations.jsonindex 7f3bbf84fd..885f276886 100644--- a/frontend/public/locales/es/translations.json+++ b/frontend/public/locales/es/translations.json@@ -236,7 +236,7 @@"validate-number": "al menos 1 número","validate-special-char": "al menos 1 carácter especial","validate-repeated-char": "au plus 2 caracteres consecutivos repetidos",- "validate-breached": "La contraseña que proporcionó se encuentra en una lista de contraseñas comúnmente utilizadas en otros sitios web. Vuelva a intentarlo con una contraseña más segura."+ "validate-breached": "La nueva contraseña se encuentra en una lista de contraseñas comúnmente utilizadas en otros sitios web. Vuelva a intentarlo con una contraseña más segura."},"token": {"service-tokens": "Tokens de servicio",diff --git a/frontend/public/locales/fr/translations.json b/frontend/public/locales/fr/translations.jsonindex 25e2de3c01..f38171085c 100644--- a/frontend/public/locales/fr/translations.json+++ b/frontend/public/locales/fr/translations.json@@ -223,7 +223,7 @@"validate-number": "au moins 1 chiffre","validate-special-char": "au moins 1 caractère spécial","validate-repeated-char": "au plus 2 caractères consécutifs répétés",- "validate-is-breached": "Le mot de passe que vous avez fourni figure dans une liste de mots de passe couramment utilisés sur d'autres sites Web. Veuillez réessayer avec un mot de passe plus fort."+ "validate-is-breached": "Le nouveau mot de passe se trouve dans une liste de mots de passe couramment utilisés sur d'autres sites Web. Veuillez réessayer avec un mot de passe plus fort."},"token": {"service-tokens": "Jetons de service",diff --git a/frontend/public/locales/ko/translations.json b/frontend/public/locales/ko/translations.jsonindex c6bec94f47..d869b0891e 100644--- a/frontend/public/locales/ko/translations.json+++ b/frontend/public/locales/ko/translations.json@@ -190,7 +190,7 @@"validate-number": "숫자 1개 이상","validate-special-char": "특수 문자 1개 이상","validate-repeated-char": "최대 2개의 반복되는 연속 문자",- "validate-breached": "귀하가 제공한 비밀번호는 다른 웹사이트에서 일반적으로 사용되는 비밀번호 목록에 포함되어 있습니다. 더 강력한 비밀번호로 다시 시도해 주세요."+ "validate-breached": "새 비밀번호는 다른 웹사이트에서 일반적으로 사용되는 비밀번호 목록에 있습니다. 더 강력한 비밀번호로 다시 시도해 주세요."},"token": {"add-dialog": {diff --git a/frontend/public/locales/pt-BR/translations.json b/frontend/public/locales/pt-BR/translations.jsonindex d6958f5a8d..d5ed68fba9 100644--- a/frontend/public/locales/pt-BR/translations.json+++ b/frontend/public/locales/pt-BR/translations.json@@ -218,7 +218,7 @@"validate-number": "pelo menos 1 número","validate-special-char": "pelo menos 1 caractere especial","validate-repeated-char": "au plus 2 caractères consécutifs répétés",- "validate-breached": "A senha que você forneceu está em uma lista de senhas comumente usadas em outros sites. Tente novamente com uma senha mais forte."+ "validate-breached": "A nova senha está em uma lista de senhas comumente usadas em outros sites. Tente novamente com uma senha mais forte."},"token": {"service-tokens": "Tokens de Serviço",diff --git a/frontend/public/locales/tr/translations.json b/frontend/public/locales/tr/translations.jsonindex cf441d0aec..cd494fe07f 100644--- a/frontend/public/locales/tr/translations.json+++ b/frontend/public/locales/tr/translations.json@@ -236,7 +236,7 @@"validate-number": "en az 1 sayı","validate-special-char": "en az 1 özel karakter","validate-repeated-char": "veya artı 2 karakter ardışık tekrar",- "validate-breached": "Sağladığınız şifre, diğer web sitelerinde yaygın olarak kullanılan şifreler listesinde yer almaktadır. Lütfen daha güçlü bir şifre ile tekrar deneyiniz."+ "validate-breached": "Yeni şifre, diğer web sitelerinde yaygın olarak kullanılan şifrelerin listesinde yer almaktadır. Lütfen daha güçlü bir şifre ile tekrar deneyiniz."},"token": {"service-tokens": "Servis Belirteçleri",diff --git a/frontend/src/components/utilities/checks/PasswordCheck.ts b/frontend/src/components/utilities/checks/PasswordCheck.tsindex 9beb48e51a..b19b64007a 100644--- a/frontend/src/components/utilities/checks/PasswordCheck.ts+++ b/frontend/src/components/utilities/checks/PasswordCheck.ts@@ -46,7 +46,7 @@ const passwordCheck = async ({}// upperCase- if (!/[A-Z]/.test(password)) {+ if (!/[A-Z\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE]/.test(password)) {setPasswordErrorUpperCase(true);errorCheck = true;} else {@@ -54,7 +54,7 @@ const passwordCheck = async ({}// lowerCase- if (!/[a-z]/.test(password)) {+ if (!/[a-z\u0061-\u007A\u00DF-\u00F6\u00F8-\u00FF]/.test(password)) {setPasswordErrorLowerCase(true);errorCheck = true;} else {@@ -82,7 +82,11 @@ const passwordCheck = async ({}// repeatedChar- if (/([A-Za-z0-9])\1\1\1/.test(password)) {+ if (+ /([!@#$%^&*(),.?":{}|<>0-9A-Za-z\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\u0600-\u06FF\u0400-\u04FF\u0500-\u052F\u2DE0-\u2DFF\uA640-\uA69F\u05B0-\u05FF\u0980-\u09FF\u1F00-\u1FFF\u0130\u015E\u011E\u00D6\u00C7\u00FC\u00FB\u00F6\u00EB\u00E7\u00C7\u003a-\u003f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\p{Emoji}])\1\1/.test(+ password+ )+ ) {setPasswordErrorRepeatedChar(true);errorCheck = true;} else {diff --git a/frontend/src/components/utilities/checks/checkPassword.ts b/frontend/src/components/utilities/checks/checkPassword.tsindex e62c2d0fdd..5067976729 100644--- a/frontend/src/components/utilities/checks/checkPassword.ts+++ b/frontend/src/components/utilities/checks/checkPassword.ts@@ -49,12 +49,12 @@ const checkPassword = async ({ password, setErrors }: CheckPasswordParams): Prom}// upperCase- if (!/[A-Z]/.test(password)) {+ if (!/[A-Z\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE]/.test(password)) {errors.upperCase = "at least 1 uppercase character (A-Z)";}// lowerCase- if (!/[a-z]/.test(password)) {+ if (!/[a-z\u0061-\u007A\u00DF-\u00F6\u00F8-\u00FF]/.test(password)) {errors.lowerCase = "at least 1 lowercase character (a-z)";}@@ -70,18 +70,22 @@ const checkPassword = async ({ password, setErrors }: CheckPasswordParams): Prom)) {errors.specialChar =- 'at least 1 special character (!@#$%^&*(),.?":{}|<>), Japanese, Korean, Arabic, Cyrillic, Greek, Devanagari, Turkish, or an emoji';+ 'at least 1 special character from !@#$%^&*(),.?":{}|<>, Japanese, Korean, Arabic, Cyrillic, Greek, Devanagari, Turkish, or an emoji';}// repeatedChar- if (/([A-Za-z0-9])\1\1\1/.test(password)) {- errors.repeatedChar = "No 3 repeat, consecutive characters";+ if (+ /([!@#$%^&*(),.?":{}|<>0-9A-Za-z\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\u0600-\u06FF\u0400-\u04FF\u0500-\u052F\u2DE0-\u2DFF\uA640-\uA69F\u05B0-\u05FF\u0980-\u09FF\u1F00-\u1FFF\u0130\u015E\u011E\u00D6\u00C7\u00FC\u00FB\u00F6\u00EB\u00E7\u00C7\u003a-\u003f\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\p{Emoji}])\1\1/.test(+ password+ )+ ) {+ errors.repeatedChar = "At most 2 repeated, consecutive characters";}// breachedPasswordif (await checkIsPasswordBreached(password)) {errors.isBreachedPassword =- "The provided password is in a list of passwords commonly used on other websites. Please try again with a stronger password.";+ "The new password is in a list of passwords commonly used on other websites. Please try again with a stronger password.";}setErrors(errors);