Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Check: only ASCII chars #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ispconfig3_pass/config/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ $config['password_min_length'] = 6;
$config['password_check_symbol'] = true;
$config['password_check_lower'] = true;
$config['password_check_upper'] = true;
$config['password_check_number'] = true;
$config['password_check_number'] = true;
$config['password_check_isascii'] = true;
6 changes: 6 additions & 0 deletions ispconfig3_pass/ispconfig3_pass.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function save()
$checkLower = $this->rcmail->config->get('password_check_lower');
$checkSymbol = $this->rcmail->config->get('password_check_symbol');
$checkNumber = $this->rcmail->config->get('password_check_number');
$checkIsAscii = $this->rcmail->config->get('password_check_isascii');
$error = false;

if (!empty($pwl)) {
Expand Down Expand Up @@ -94,6 +95,11 @@ function save()
$this->rcmail->output->command('display_message', $this->gettext('passwordchecksymbol'), 'error');
}

if (!$error && $checkIsAscii && preg_match("/[^\x20-\x7F]/", $newpwd)) {
$error = true;
$this->rcmail->output->command('display_message', $this->gettext('passwordcheckisascii'), 'error');
}

if (!$error) {
try {
$soap = new SoapClient(null, array(
Expand Down
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/bg_BG.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Новата паролата е прекал
$messages['passwordchecknumber'] = 'Новата парола трябва да съдържа поне една цифра.';
$messages['passwordchecklower'] = 'Новата парола трябва да съдържа поне една малка буква.';
$messages['passwordcheckupper'] = 'Новата парола трябва да съдържа поне една ГОЛЯМА буква.';
$messages['passwordchecksymbol'] = 'Новата парола трябва да съдържа поне един специ@лен симол.';
$messages['passwordchecksymbol'] = 'Новата парола трябва да съдържа поне един специ@лен симол.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/cs_CZ.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Heslo je příliš krátké: délka hesla mus
$messages['passwordchecknumber'] = 'Heslo musí obsahovat alespoň jedno číslo.';
$messages['passwordchecklower'] = 'Heslo musí obsahovat alespoň jedno malé písmeno.';
$messages['passwordcheckupper'] = 'Heslo musí obsahovat alespoň jedno velké písmeno.';
$messages['passwordchecksymbol'] = 'Heslo musí obsahovat alespoň jeden symbol.';
$messages['passwordchecksymbol'] = 'Heslo musí obsahovat alespoň jeden symbol.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/da_DK.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Adgangskode for kort: %d cifre krævet.';
$messages['passwordchecknumber'] = 'Adgangskode skal indeholde mindst ét tal.';
$messages['passwordchecklower'] = 'Adgangskode skal indeholde mindst ét stort bogstav.';
$messages['passwordcheckupper'] = 'Adgangskode skal indeholde mindst ét lille bogstav.';
$messages['passwordchecksymbol'] = 'Adgangskode skal indeholde mindst ét symbol.';
$messages['passwordchecksymbol'] = 'Adgangskode skal indeholde mindst ét symbol.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/de_DE.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Das Passwort ist zu kurz (Mindestlänge ist %d
$messages['passwordchecknumber'] = 'Das Passwort muss mindestens eine Zahl enthalten.';
$messages['passwordchecklower'] = 'Das Passwort muss mindestens einen Kleinbuchstaben enthalten.';
$messages['passwordcheckupper'] = 'Das Passwort muss mindestens einen Großbuchstaben enthalten.';
$messages['passwordchecksymbol'] = 'Das Passwort muss mindestens ein Symbol enthalten.';
$messages['passwordchecksymbol'] = 'Das Passwort muss mindestens ein Symbol enthalten.';
$messages['passwordcheckisascii'] = 'Bitte verwenden Sie keine Umlaute im Passwort. Dies kann zu Problemen mit Ihrem E-Mail-Programm führen.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/en_US.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Password is too short: %d digits required.';
$messages['passwordchecknumber'] = 'Password must include at least one number.';
$messages['passwordchecklower'] = 'Password must include at least one lowercase letter.';
$messages['passwordcheckupper'] = 'Password must include at least one uppercase letter.';
$messages['passwordchecksymbol'] = 'Password must include at least one symbol.';
$messages['passwordchecksymbol'] = 'Password must include at least one symbol.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/es_ES.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'La contraseña es demasiado corta. Debe tener,
$messages['passwordchecknumber'] = 'La contraseña debe incluir al menos un número.';
$messages['passwordchecklower'] = 'La contraseña debe incluir al menos una minúscula.';
$messages['passwordcheckupper'] = 'La contraseña debe incluir al menos una mayúscula.';
$messages['passwordchecksymbol'] = 'La contraseña debe incluir al menos un símbolo.';
$messages['passwordchecksymbol'] = 'La contraseña debe incluir al menos un símbolo.';
$messages['passwordcheckisascii'] = 'Por favor, no use caracteres unicode especiales en su contraseña. Esto puede conllevar a errores en su cliente de correo.';
1 change: 1 addition & 0 deletions ispconfig3_pass/localization/fi_FI.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ $messages['passwordchecknumber'] = 'Salasanassa täytyy olla vähintään yksi n
$messages['passwordchecklower'] = 'Salasanassa täytyy olla vähintään yksi pieni kirjain';
$messages['passwordcheckupper'] = 'Salasanassa täytyy olla vähintään yksi iso kirjain';
$messages['passwordchecksymbol'] = 'Salasanassa täytyy olla vähintään yksi erikoismerkki';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/fr_FR.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Le mot de passe est trop court: %d caractères
$messages['passwordchecknumber'] = 'Le mot de passe doit inclure au moins un nombre.';
$messages['passwordchecklower'] = 'Le mot de passe doit inclure au moins une minuscule.';
$messages['passwordcheckupper'] = 'Le mot de passe doit inclure au moins une majuscule.';
$messages['passwordchecksymbol'] = 'Le mot de passe doit inclure au moins un caractère spécial.';
$messages['passwordchecksymbol'] = 'Le mot de passe doit inclure au moins un caractère spécial.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/gl_ES.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'O contrasinal é curto de máis. Debe de ter,
$messages['passwordchecknumber'] = 'O contrasinal debe incluír polo menos un número.';
$messages['passwordchecklower'] = 'O contrasinal debe incluír polo menos unha minúscula.';
$messages['passwordcheckupper'] = 'O contrasinal debe incluír polo menos unha maiúscula.';
$messages['passwordchecksymbol'] = 'O contrasinal debe incluir polo menos un símbolo.';
$messages['passwordchecksymbol'] = 'O contrasinal debe incluir polo menos un símbolo.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/hu_HU.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'A jelszó túl rövid: %d karakter szükséges
$messages['passwordchecknumber'] = 'A jelszónak legalább egy számot kell tartalmaznia.';
$messages['passwordchecklower'] = 'A jelszónak legalább egy kisbetűt kell tartalmaznia.';
$messages['passwordcheckupper'] = 'A jelszónak legalább egy nagybetűt kell tartalmaznia.';
$messages['passwordchecksymbol'] = 'A jelszónak legalább egy szimbólumot kell tartalmaznia.';
$messages['passwordchecksymbol'] = 'A jelszónak legalább egy szimbólumot kell tartalmaznia.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/it_IT.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'La password inserita è troppo corta: sono ric
$messages['passwordchecknumber'] = 'La password deve includere almeno un numero.';
$messages['passwordchecklower'] = 'La password deve includere almeno una minuscola.';
$messages['passwordcheckupper'] = 'La password deve includere almeno una maiuscola.';
$messages['passwordchecksymbol'] = 'La password deve includere almeno un simbolo.';
$messages['passwordchecksymbol'] = 'La password deve includere almeno un simbolo.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/lb_LU.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'D\'Passwuert ass ze kuerz (Mindestlängt sinn
$messages['passwordchecknumber'] = 'D\'Passwuert muss mindestens eng Zuel enthalen.';
$messages['passwordchecklower'] = 'D\'Passwuert muss mindestens ee klenge Buschtaf enthalen.';
$messages['passwordcheckupper'] = 'D\'Passwuert muss mindestens ee grousse Buschtaf enthalen.';
$messages['passwordchecksymbol'] = 'D\'Passwuert muss mindestens ee Symbol enthalen.';
$messages['passwordchecksymbol'] = 'D\'Passwuert muss mindestens ee Symbol enthalen.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
1 change: 1 addition & 0 deletions ispconfig3_pass/localization/lv_LV.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ $messages['passwordchecknumber'] = 'Parolei jāsatur vismaz viens cipars.';
$messages['passwordchecklower'] = 'Parolei jāsatur vismaz viens mazais latīņu alfabēta burts.';
$messages['passwordcheckupper'] = 'Parolei jāsatur vismaz viens lielais latīņu alfabēta burts.';
$messages['passwordchecksymbol'] = 'Parolei jāsatur vismaz viens speciālais simbols.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/nl_NL.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Wachtwoord is te kort: %d tekens vereist.';
$messages['passwordchecknumber'] = 'Wachtwoord moet op zijn minst een nummer bevatten.';
$messages['passwordchecklower'] = 'Wachtwoord moet ten minste één kleine letter bevatten.';
$messages['passwordcheckupper'] = 'Wachtwoord moet minstens één hoofdletter bevatten.';
$messages['passwordchecksymbol'] = 'Wachtwoord moet ten minste één symbool bevatten.';
$messages['passwordchecksymbol'] = 'Wachtwoord moet ten minste één symbool bevatten.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/pl_PL.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ $messages['passwordchecklower'] = 'Hasło musi zawierać co najmniej jedną mał
$messages['passwordcheckupper'] = 'Hasło musi zawierać co najmniej jedną wielką literę.';
$messages['passwordchecksymbol'] = 'Hasło musi zawierać co najmniej jeden znak specjalny (jak . , - + ).';
$messages['internalerror'] = 'Błąd bazy danych serwera. To może być niebezpieczne dla innych użytkowników. Proszę się skontaktować z administratorem systemu.';
$messages['errorsaving'] = 'Nie można zapisać hasła w bazie danych. Proszę się skontaktować z administratorem systemu.';
$messages['errorsaving'] = 'Nie można zapisać hasła w bazie danych. Proszę się skontaktować z administratorem systemu.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/pt_BR.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Sua senha esta muito curta: são requeridos pe
$messages['passwordchecknumber'] = 'Senha tem que incluir pelo menos um número.';
$messages['passwordchecklower'] = 'Senha deve incluir pelo menos uma minúscula.';
$messages['passwordcheckupper'] = 'Senha deve incluir pelo menos uma maiúscula.';
$messages['passwordchecksymbol'] = 'Senha deve incluir pelo menos um símbolo.';
$messages['passwordchecksymbol'] = 'Senha deve incluir pelo menos um símbolo.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/ru_RU.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Новый пароль слишком кор
$messages['passwordchecknumber'] = 'Новый пароль должен содержать по крайней мере одну цифру.';
$messages['passwordchecklower'] = 'Новый пароль должен содержать по крайней мере одну маленькую букву.';
$messages['passwordcheckupper'] = 'Новый пароль должен содержать по крайней мере одну заглавную букву.';
$messages['passwordchecksymbol'] = 'Новый пароль должен содержать по крайней мере один спец-символ.';
$messages['passwordchecksymbol'] = 'Новый пароль должен содержать по крайней мере один спец-символ.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/sl_SI.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Geslo je prekratko: vsaj %d znakov.';
$messages['passwordchecknumber'] = 'Geslo mora vključevati vsaj eno številko.';
$messages['passwordchecklower'] = 'Geslo mora vsebovati vsaj eno male črke.';
$messages['passwordcheckupper'] = 'Geslo mora vsebovati vsaj eno veliko črko.';
$messages['passwordchecksymbol'] = 'Geslo mora vsebovati vsaj en simbol.';
$messages['passwordchecksymbol'] = 'Geslo mora vsebovati vsaj en simbol.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/sv_SE.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Lösenordet är för kort, minst %d tecken kr
$messages['passwordchecknumber'] = 'Lösenordet måste innehålla minst ett nummer.';
$messages['passwordchecklower'] = 'Lösenordet måste innehålla minst en små bokstav.';
$messages['passwordcheckupper'] = 'Lösenordet måste innehålla minst en stor bokstav.';
$messages['passwordchecksymbol'] = 'Lösenordet måste innehålla minst en symbol.';
$messages['passwordchecksymbol'] = 'Lösenordet måste innehålla minst en symbol.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
3 changes: 2 additions & 1 deletion ispconfig3_pass/localization/uk_UA.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ $messages['passwordminlength'] = 'Пароль занадто короткий:
$messages['passwordchecknumber'] = 'Пароль повинен містити принаймні один номер.';
$messages['passwordchecklower'] = 'Пароль повинен містити принаймні одну малу літеру.';
$messages['passwordcheckupper'] = 'Пароль повинен містити принаймні одну велику літеру.';
$messages['passwordchecksymbol'] = 'Пароль повинен містити принаймні один символ.';
$messages['passwordchecksymbol'] = 'Пароль повинен містити принаймні один символ.';
$messages['passwordcheckisascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';