1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-31 10:04:20 +03:00

Add password special character support

This commit is contained in:
Oliver Cooper
2022-02-13 17:21:20 +00:00
parent f0df017df3
commit 35ecb62730
37 changed files with 53 additions and 1 deletions

View File

@ -240,6 +240,7 @@ $CONF['password_validation'] = array(
'/.{5}/' => 'password_too_short 5', # minimum length 5 characters
'/([a-zA-Z].*){3}/' => 'password_no_characters 3', # must contain at least 3 characters
'/([0-9].*){2}/' => 'password_no_digits 2', # must contain at least 2 digits
# '/([!\".,*&^%$£)(_+=\-`\'#@~\[\]\\<>\/].*){1}/' => 'password_no_special 1', # must contain at least 1 special character
/* support a 'callable' value which if it returns a non-empty string will be assumed to have failed, non-empty string should be a PALANG key */
// 'length_check' => function($password) { if (strlen(trim($password)) < 3) { return 'password_too_short'; } },

View File

@ -351,6 +351,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -364,6 +364,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Heslo je příliš krátké - je vyžadováno minimálně %s znaků";
$PALANG['password_no_characters'] = "Heslo musí obsahovat alespoň %s písmen/a (A-Z, a-z).";
$PALANG['password_no_digits'] = "Heslo musí obsahovat alespoň %s číslici(-ce).";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Neplatné doménové jméno %s, nevyhovělo regulárnímu výrazu";
$PALANG['pInvalidDomainDNS'] = "Neplatná doména %s, a/nebo nezjištěn DNS záznam.";
$PALANG['pInvalidMailRegex'] = "Neplatná emailová adresa %s, nevyhověla regulárnímu výrazu.";

View File

@ -363,6 +363,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Adgangskoden er for kort. Der kræves mindst %s tegn";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Ugyldigt domæne-navn %s. Fejlede regulært udtryks-tjek";
$PALANG['pInvalidDomainDNS'] = "Ugyldigt domæne %s, og/eller ikke fundet i DNS";
$PALANG['pInvalidMailRegex'] = "Ugyldig emailadresse %s. Fejlede regulært udtryks-tjek"; # XXX %s added, check if text is ok

View File

@ -361,6 +361,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Das Passwort ist zu kurz - mindestens %s Zeichen benötigt";
$PALANG['password_no_characters'] = "Ihr Passwort muss mindestens %s Buchstaben (A-Z, a-z) enthalten.";
$PALANG['password_no_digits'] = "Ihr Passwort muss mindestens %s Ziffer(n) enthalten.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Ungültiger Domainname %s - Überprüfung per RegEx fehlgeschlagen";
$PALANG['pInvalidDomainDNS'] = "Ungültige Domain %s - nicht per DNS auflösbar";
$PALANG['pInvalidMailRegex'] = "Ungültige Mailadresse %s - Überprüfung per RegEx fehlgeschlagen";

View File

@ -363,6 +363,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Password is too short - requires %s characters";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z).";
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s).";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s).";
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check";
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS";
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check";

View File

@ -352,6 +352,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "La contraseña es demasiado corta - se necesitan %s caracteres";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "El nombre de dominio %s es inválido, no se ajusta a la expresión regular";
$PALANG['pInvalidDomainDNS'] = "El dominio %s no es válido, y/o no tiene resolución DNS";
$PALANG['pInvalidMailRegex'] = "La dirección de email no es válidas, no se ajusta a la expresión regular (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -354,6 +354,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -349,6 +349,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Salasana on liian lyhyt, vaaditaan %s merkkiä";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Virheellinen domain nimi %s, ei läpäise regexp testiä";
$PALANG['pInvalidDomainDNS'] = "Virheellinen domain %s ja/tai ei löydy nimipalvelimista";
$PALANG['pInvalidMailRegex'] = "Virheellinen sähköpostiosoite, ei läpäise regexp testiä (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -355,6 +355,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -355,6 +355,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = 'Mot de passe trop court. - %s caractères minimum';
$PALANG['password_no_characters'] = 'Votre mot de passe doit contenir au moins %s lettres (A-Z, a-z).';
$PALANG['password_no_digits'] = 'Votre mot de passe doit contenir au moins %s chiffres.';
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = 'Nom de domaine invalide %s, vérification "regexp" impossible';
$PALANG['pInvalidDomainDNS'] = 'Le domaine %s est invalide et/ou non résolvable via les DNS';
$PALANG['pInvalidMailRegex'] = 'L\'adresse email %s est invalide, vérification "regexp" impossible';

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "O contrasinal é demasiado corto - necesitanse %s caracteres";
$PALANG['password_no_characters'] = "O contrasinal debe conter ao menos %s letras (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "O contrasinal debe conter ao menos %s díxito(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "O nome de dominio %s é inválido, non se axusta á expresión regular";
$PALANG['pInvalidDomainDNS'] = "O dominio %s non é válido, e/ou non ten resolución DNS";
$PALANG['pInvalidMailRegex'] = "A dirección de email non é válida, non se axusta á expresión regular (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -348,6 +348,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -362,6 +362,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "A Jelszó túl rövid - legalább %s karakter szükséges";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -351,6 +351,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Password troppo breve - minimo %s caratteri";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -360,6 +360,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "パスワードが短すぎます。最低 %s 文字必要です。";
$PALANG['password_no_characters'] = "パスワードには、少なくとも %s 個の英字がなくてはなりません。"; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "パスワードには、少なくとも %s 個の数字がなくてはなりません。";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "不正なドメイン名です[%s]。正規表現チェックで失敗";
$PALANG['pInvalidDomainDNS'] = "不正なドメイン[%s]であるか、もしくは DNS に見当たりません";
$PALANG['pInvalidMailRegex'] = "不正なメールアドレスです[%s]。正規表現チェックで失敗";

View File

@ -356,6 +356,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -351,6 +351,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Passordet er for kort - det må inneholde minst %s tegn";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Ugyldig domenenavn %s, regexp-validering feilet";
$PALANG['pInvalidDomainDNS'] = "Ugyldig domene %s, og/eller finnes ikke i DNS";
$PALANG['pInvalidMailRegex'] = "Ugyldig e-postadresse, regexp-validering feilet (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -352,6 +352,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Wachtwoord is te kort - moet minimaal %s karakters bevatten";
$PALANG['password_no_characters'] = "Je wachtwoord moet minimaal %s karakter(s) bevatten."; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "Je wachtwoord moet minimaal %s getal(len) bevatten.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Ongeldig domein naam %s";
$PALANG['pInvalidDomainDNS'] = "Ongeldig domein %s";
$PALANG['pInvalidMailRegex'] = "Ongeldig email adres %s komt niet door de limietcheck"; # XXX text change to: "Invalid email address %s, fails regexp check"

View File

@ -349,6 +349,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -356,6 +356,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = 'Hasło jest za krótkie - musi mieć minimum %s znaków';
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = 'Nieprawidłowa nazwa domeny %s';
$PALANG['pInvalidDomainDNS'] = 'Nieprawidłowa domena %s, nie wykrywana w DNS';
$PALANG['pInvalidMailRegex'] = 'Nieprawidłowy adres email %s'; # XXX text changed to "Invalid email address %s, fails regexp check"

View File

@ -362,6 +362,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Senha muito curta - requer %s caracteres";
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Nome de domínio inválido %s, falhou checagem por expressão regular";
$PALANG['pInvalidDomainDNS'] = "Domínio inválido %s, e/ou não pôde ser resolvido por DNS";
$PALANG['pInvalidMailRegex'] = "Endereço de email inválido, falhou checagem por expressão regular (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -362,6 +362,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Password muito curta - requer %s caracteres";
$PALANG['password_no_characters'] = "A password tem de conter pelo menos %s letras (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "A password tem de conter pelo menos %s digito(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Nome de domínio inválido %s, falhou a verificação por expressão regular";
$PALANG['pInvalidDomainDNS'] = "Domínio inválido %s, e/ou não pode ser resolvido por DNS";
$PALANG['pInvalidMailRegex'] = "Endereço de email inválido, falhou a verificação por expressão regular (%s)"; # XXX %s added - but it should be in the text, not at the end

View File

@ -360,6 +360,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Parola prea scurta - minim %s caractere";
$PALANG['password_no_characters'] = "Parola trebuie sa contina cel putin %s litere."; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "Parola trebuie sa contina cel putin %s cifre.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Nume domeniu incorect %s, verificare regexp esuata";
$PALANG['pInvalidDomainDNS'] = "Nume domeniu incorect %s, si/sau nu se poate rezolva in DNS";
$PALANG['pInvalidMailRegex'] = "Adresa de mail incorecta %s, verificare regexp esuata";

View File

@ -363,6 +363,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Пароль слишком короткий: требуется %s символов";
$PALANG['password_no_characters'] = "Ваш пароль должен содержать не менее %s символов.";
$PALANG['password_no_digits'] = "Ваш пароль должен содержать не менее %s цифр(ы).";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Некорректное имя домена %s, не соответствует регулярному выражению";
$PALANG['pInvalidDomainDNS'] = "Некорректный домен %s, и/или не обнаруживается в DNS";
$PALANG['pInvalidMailRegex'] = "Некорректный email %s, не соответствует регулярному выражению";

View File

@ -351,6 +351,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "Heslo je príliš krátke - musí mať aspoň %s znakov";
$PALANG['password_no_characters'] = "Heslo musí obsahovať aspoň %s písmen."; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "Heslo musí obsahovať aspoň %s číslic.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Neplatný názov domény %s";
$PALANG['pInvalidDomainDNS'] = "Neplatná doména %s alebo neexistuje jej DNS záznam";
$PALANG['pInvalidMailRegex'] = "Neplatná emailová adresa %s"; # text change to "Invalid email address %s, fails regexp check"

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Password is too short - requires %s characters"; # XXX
$PALANG['password_no_characters'] = "Your password must contain at least %s letters (A-Z, a-z)."; # XXX
$PALANG['password_no_digits'] = "Your password must contain at least %s digit(s)."; # XXX
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX
$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX
$PALANG['pInvalidMailRegex'] = "Invalid email address %s, fails regexp check"; # XXX

View File

@ -361,6 +361,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = "För kort lösenord - ett lösenord på %s tecken krävs";
$PALANG['password_no_characters'] = "Lösenordet måste innehålla minst %s tecken."; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "Lösenordet måste innehålla minst %s siffra/siffror.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Regexp-kollen misslyckas på domänen %s";
$PALANG['pInvalidDomainDNS'] = "Domänen %s finns inte i DNS";
$PALANG['pInvalidMailRegex'] = "Regexp-kollen misslyckas på e-postadressen %s";

View File

@ -350,6 +350,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "Şifre çok kısa - en az %s karakter gerekli";
$PALANG['password_no_characters'] = "Şifreniz en az %s karakter içermeli (A-Z, a-z).";
$PALANG['password_no_digits'] = "Şifreniz en az %s rakam içermeli.";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "Geçersiz domain ismi: %s, kontrol edilemedi";
$PALANG['pInvalidDomainDNS'] = "Geçersiz domain: %s, ve/veya DNS tarafından çözümlenemedi";
$PALANG['pInvalidMailRegex'] = "Geçersiz e-posta adresi: %s, kontrol edilemedi";

View File

@ -352,6 +352,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP '; # XXX
$PALANG['password_too_short'] = "密碼太短 - 需要 %s 個字附";
$PALANG['password_no_characters'] = "你的密碼最少要有 %s 字母。"; # XXX text changed to "Your password must contain at least %s letters (A-Z, a-z)."
$PALANG['password_no_digits'] = "你的密碼最少要有 %s 數字。";
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = "網域名 %s 不正確,未能通過 regexp 檢查";
$PALANG['pInvalidDomainDNS'] = "網域名 %s 不正確或在DNS找不到";
$PALANG['pInvalidMailRegex'] = '電郵地址 %s 不正確,未能通過 regexp 檢查';

View File

@ -363,6 +363,7 @@ $PALANG['pStatus_popimap'] = 'POP/IMAP ';
$PALANG['password_too_short'] = 'Пароль занадто короткий - потрібно %s символів';
$PALANG['password_no_characters'] = 'Ваш пароль повинен містити не менше ніж %s символів (A-Z, a-z).';
$PALANG['password_no_digits'] = 'Ваш пароль повинен містити не менше ніж %s цифр(и).';
$PALANG['password_no_special'] = "Your password must contain at least %s special character(s)."; # XXX
$PALANG['pInvalidDomainRegex'] = 'Некоректне ім&#0039;я домену %s, не відповідає регулярному виразу';
$PALANG['pInvalidDomainDNS'] = 'Некоректний домен %s, та/або не виявляється в DNS';
$PALANG['pInvalidMailRegex'] = 'Некоректний Email %s, не відповідає регулярному виразу';

View File

@ -12,6 +12,7 @@ class ValidatePasswordTest extends \PHPUnit\Framework\TestCase
'/.{5}/' => 'password_too_short 5', # minimum length 5 characters
'/([a-zA-Z].*){3}/' => 'password_no_characters 3', # must contain at least 3 characters
'/([0-9].*){2}/' => 'password_no_digits 2', # must contain at least 2 digits
# '/([!\".,*&^%$£)(_+=\-`\'#@~\[\]\\<>\/].*){1}/' => 'password_no_special 1', # must contain at least 1 special character
));
$this->assertEmpty(validate_password('fishSheep01'));
@ -19,4 +20,19 @@ class ValidatePasswordTest extends \PHPUnit\Framework\TestCase
$this->assertNotEmpty(validate_password('pas')); // notEmpty == fail
$this->assertNotEmpty(validate_password('pa1'));
}
public function testSpecial()
{
$config = Config::getInstance();
// Set to the defaults, just to make sure.
Config::write('password_validation', array(
'/([!\".,*&^%$£)(_+=\-`\'#@~\[\]\\<>\/].*){2}/' => 'password_no_special 1', # must contain at least 1 special character
));
$this->assertEmpty(validate_password('fish^Sh$$p01'));
$this->assertEmpty(validate_password(']/>'));
$this->assertEmpty(validate_password("P'55w\ord"));
$this->assertNotEmpty(validate_password("fish'Sheep01"));
}
}