Commit c99650a6 authored by Marius Cramer's avatar Marius Cramer
Browse files

Added check for ascii characters in password (if enabled in system config)

parent 0bfbaafe
......@@ -38,6 +38,8 @@
*/
global $app;
$app->uses('getconf');
$global_config = $app->getconf->get_global_config();
$form["title"] = "Mailbox";
$form["description"] = "";
......@@ -56,7 +58,7 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['mailuser'] = array (
$form["tabs"]['mailuser'] = array(
'title' => "Mailbox",
'width' => 100,
'template' => "templates/mail_user_mailbox_edit.htm",
......@@ -230,6 +232,12 @@ $form["tabs"]['mailuser'] = array (
)
);
if($global_config['mail']['mail_password_onlyascii'] == 'y') {
$form['tabs']['mailuser']['fields']['password']['validators'] = array( 0 => array( 'type' => 'ISASCII',
'errmsg' => 'email_error_isascii')
);
}
$form["tabs"]['autoresponder'] = array (
'title' => "Autoresponder",
'width' => 100,
......
......@@ -47,4 +47,5 @@ $wb['generate_password_txt'] = 'Passwort erzeugen';
$wb['repeat_password_txt'] = 'Passwort wiederholen';
$wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.';
$wb['password_match_txt'] = 'Die Passwörter stimmen überein.';
$wb['email_error_isascii'] = 'Bitte verwenden Sie keine Umlaute im Passwort. Dies kann zu Problemen mit Ihrem E-Mail-Programm führen.';
?>
\ No newline at end of file
......@@ -47,4 +47,5 @@ $wb['generate_password_txt'] = 'Generate Password';
$wb['repeat_password_txt'] = 'Repeat Password';
$wb['password_mismatch_txt'] = 'The passwords do not match.';
$wb['password_match_txt'] = 'The passwords do match.';
$wb['email_error_isascii'] = 'Please do not use special unicode characters for your password. This could lead to problems with your mail client.';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment