Skip to content

Commit dbfab6b

Browse files
committed
fix various ispcmail issues. fixes #5620
1 parent 48f2ae5 commit dbfab6b

File tree

27 files changed

+54
-18
lines changed

27 files changed

+54
-18
lines changed

interface/lib/classes/ispcmail.inc.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function setOption($key, $value) {
169169
$this->smtp_host = $value;
170170
break;
171171
case 'smtp_port':
172-
$this->smtp_port = $value;
172+
if(intval($value) > 0) $this->smtp_port = $value;
173173
break;
174174
case 'smtp_user':
175175
$this->smtp_user = $value;
@@ -586,8 +586,8 @@ private function _encodeSubject($input, $charset = 'ISO-8859-1') {
586586
*/
587587
private function _smtp_login() {
588588
$this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30);
589-
$response = fgets($this->_smtp_conn, 515);
590589
if(empty($this->_smtp_conn)) return false;
590+
$response = fgets($this->_smtp_conn, 515);
591591

592592
//Say Hello to SMTP
593593
if($this->smtp_helo == '') $this->detectHelo();
@@ -607,8 +607,11 @@ private function _smtp_login() {
607607
}
608608
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_host', false);
609609
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_peer', false);
610+
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_peer_name', false);
610611
stream_context_set_option($this->_smtp_conn, 'ssl', 'allow_self_signed', true);
611-
stream_socket_enable_crypto($this->_smtp_conn, true, $crypto_method);
612+
if (stream_socket_enable_crypto($this->_smtp_conn, true, $crypto_method) != true) {
613+
return false;
614+
}
612615
}
613616

614617
//AUTH LOGIN

interface/web/login/lib/lang/ar.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'A new password will be generated and send to your email
77
$wb['pw_reset'] = 'The password has been reset and send to your email address.';
88
$wb['pw_error'] = 'Username or email address does not match.';
99
$wb['pw_error_noinput'] = 'Please enter email address and username.';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
1112
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset.';
1213
$wb['user_regex_error'] = 'Username contains unallowed characters or is longer then 64 characters.';

interface/web/login/lib/lang/bg.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $wb['pass_reset_txt'] = 'Нова парола ще бъде генериран
33
$wb['pw_reset'] = 'Новата ви парола беше изпратена на електронната ви поща.';
44
$wb['pw_error'] = 'Греяно потребителското име или електронна поща.';
55
$wb['pw_error_noinput'] = 'Моля въведете потребителско име и електронна поща.';
6+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
67
$wb['pw_reset_mail_msg'] = 'Новата парола за вашия ISPConfig 3 контролен панел е:';
78
$wb['pw_reset_mail_title'] = 'Нова парола за вашия ISPConfig 3 контролен панел';
89
$wb['user_regex_error'] = 'Потребителско име contains unallowed characters or is longer then 64 characters.';

interface/web/login/lib/lang/br.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'Uma nova senha foi gerada e será enviada para você no
77
$wb['pw_reset'] = 'Senha redefinida! Ela será enviada para você no e-mail cadastrado no sistema.';
88
$wb['pw_error'] = 'Nome do usuário ou e-mail não coincidem.';
99
$wb['pw_error_noinput'] = 'Favor informar nome do usuário e e-mail válidos.';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'A senha para esta conta no ISPConfig foi redefinida. A nova senha é: ';
1112
$wb['pw_reset_mail_title'] = 'A senha para esta conta no ISPConfig foi redefinida.';
1213
$wb['user_regex_error'] = 'O nome do usuário contém menos de 1 ou mais de 64 caracteres ou contém caracteres inválidos.';

interface/web/login/lib/lang/ca.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'Un nouveau mot de passe vous sera envoyé à votre adre
77
$wb['pw_reset'] = 'Le mot de passe a été réinitialisé, et vous a été envoyé à votre adresse e-mail.';
88
$wb['pw_error'] = 'Le nom d\'utilisateur et/ou L\'adresse e-mail ne correspondent pas.';
99
$wb['pw_error_noinput'] = 'Entrez votre nom d\'utilisateur et votre adresse e-mail.';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'Le mot de passe d\'accès à votre panel a été réinitialisé. Le nouveau mot de passe est : ';
1112
$wb['pw_reset_mail_title'] = 'Le mot de passe d\'accès à votre panel a été réinitialisé.';
1213
$wb['user_regex_error'] = 'Le nom d\'utilisateur contient des caractères incorrects ou contient plus de 64 caractères.';

interface/web/login/lib/lang/cz.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'Bude Vám vygenerováno a zasláno nové heslo na e-mai
77
$wb['pw_reset'] = 'Heslo bylo resetováno a zasláno na Váš e-mail.';
88
$wb['pw_error'] = 'Uživatelské jméno nebo e-mail nesouhlasí.';
99
$wb['pw_error_noinput'] = 'Prosím zadejte uživatelské jméno a e-mail.';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'Vaše heslo do ISPConfigu bylo resetováno. Nové heslo je: ';
1112
$wb['pw_reset_mail_title'] = 'Heslo do ISPConfigu bylo resetováno.';
1213
$wb['user_regex_error'] = 'Uživatelské jméno obsahuje nepovolené znaky nebo je delší než 64 znaků.';

interface/web/login/lib/lang/de.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $wb['pw_reset'] = 'Das Passwort wurde zurückgesetzt und wird per E-Mail an Sie
88
$wb['pw_reset_act'] = 'Ein Aktivierungslink wurde per E-Mail an Sie geschickt. Bitte bestätigen Sie die Anforderung eines neuen Passwortes.';
99
$wb['pw_error'] = 'Benutzername oder E-Mail Adresse stimmen nicht überein.';
1010
$wb['pw_error_noinput'] = 'Bitte geben Sie Ihre E-Mail Adresse und Ihren Benutzernamen ein.';
11+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1112
$wb['pw_reset_mail_msg'] = 'Das Passwort wurde zurückgesetzt. Das neue Passwort lautet: ';
1213
$wb['pw_reset_mail_title'] = 'Ihr Passwort wurde zurückgesetzt';
1314
$wb['pw_reset_act_mail_msg'] = 'Bitte bestätigen Sie die Anforderung eines neuen Passworts, indem Sie folgenden Link besuchen: ';

interface/web/login/lib/lang/dk.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'En ny adgangskode vil blive genereret og sendt til din
77
$wb['pw_reset'] = 'Adgangskoden er blevet nulstillet og sendt til din e-mail adresse.';
88
$wb['pw_error'] = 'Brugernavn eller e-mail adresse matcher ikke.';
99
$wb['pw_error_noinput'] = 'Indtast e-mail adresse og brugernavn.';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'Adgangskoden til din ISPConfig 3 kontrol panel konto er blevet nulstillet. Den nye adgangskode er: ';
1112
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Kontrol panel adgangskode er blevet nulstillet.';
1213
$wb['user_regex_error'] = 'Brugernavn indeholder Ikke-tilladte karakterer eller er længer end 64 karaktere.';

interface/web/login/lib/lang/el.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ $wb['pass_reset_txt'] = 'Ένα νέο συνθηματικό θα δημιου
77
$wb['pw_reset'] = 'Το νέο συνθηματικό δημιουργηθήκε και στάλθηκε στο e-mail που δηλώσατε';
88
$wb['pw_error'] = 'Το όνομα χρήστη ή το email δεν ταιριάζουν';
99
$wb['pw_error_noinput'] = 'Παρακαλούμε εισάγετε διεύθυνση email και όνομα χρήστη';
10+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1011
$wb['pw_reset_mail_msg'] = 'Ο κωδικός σας για το εργαλείο διαχείρισης ISPConfig 3 έχει αρχικοποιηθεί. Το νέο συνθηματικό είναι: ';
1112
$wb['pw_reset_mail_title'] = 'το συνθηματικό σας για το εργαλείο διαχείρισης ISPConfig 3 έχει αρχικοποιηθεί.';
1213
$wb['user_regex_error'] = 'Το όνομα χρήστη περιέχει μη επιτρεπόμενους χαρακτήρες ή το μέγεθος του ξεπερνά του 64 χαρακτήρες.';

interface/web/login/lib/lang/en.lng

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
$wb['error_user_password_empty'] = "Username or Password empty.";
33
$wb['error_user_password_incorrect'] = "Username or Password wrong.";
44
$wb['error_user_blocked'] = "User is blocked.";
5-
$wb['error_user_too_many_logins'] = "To many wrong login's, Please retry it after 15 minutes";
6-
$wb['pass_reset_txt'] = 'A new password will be generated and send to your email address if the email address entered below matches the email address in your client settings.';
7-
$wb['pw_reset'] = 'The password has been reset and send to your email address.';
8-
$wb['pw_reset_act'] = 'You have been sent an activation link. Please visit the link to confirm your password request.';
5+
$wb['error_user_too_many_logins'] = "Too many failed login attempts. Please retry after 15 minutes";
6+
$wb['pass_reset_txt'] = 'A new password will be generated and sent to your email address if the email address entered below matches the email address in your client settings.';
7+
$wb['pw_reset'] = 'The password has been reset and sent to your email address.';
8+
$wb['pw_reset_act'] = 'You have been sent a password reset link. Please visit the link to confirm your password reset request.';
99
$wb['pw_error'] = 'Username or email address does not match.';
1010
$wb['pw_error_noinput'] = 'Please enter email address and username.';
11+
$wb['pw_reset_error_smtp_connection'] = 'There was a connection problem when trying to send an email pertaining to your password reset request.';
1112
$wb['pw_reset_mail_msg'] = 'The password to your ISPConfig 3 control panel account has been reset. The new password is: ';
1213
$wb['pw_reset_mail_title'] = 'ISPConfig 3 Control panel password has been reset';
1314
$wb['pw_reset_act_mail_title'] = 'Confirm ISPConfig 3 Control panel password reset';
1415
$wb['pw_reset_act_mail_msg'] = 'Please confirm that your want to reset your ISPConfig 3 control panel account password by visiting the following activation link: ';
1516
$wb['user_regex_error'] = 'Username contains unallowed characters or is longer than 64 characters.';
1617
$wb['pw_error_length'] = 'The password length is < 1 or > 256 characters.';
17-
$wb['email_error'] = 'Email contains unallowed characters or has a invalid format.';
18+
$wb['email_error'] = 'Email contains unallowed characters or has an invalid format.';
1819
$wb['login_txt'] = "Login";
1920
$wb['username_txt'] = "Username";
2021
$wb['password_txt'] = "Password";
@@ -28,7 +29,7 @@ $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under
2829
$wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
2930
$wb['stay_logged_in_txt'] = 'Keep me logged in';
3031
$wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.';
31-
$wb['lost_password_function_wait_txt'] = 'You cannot request a new password, yet. Please wait a few minutes.';
32+
$wb['lost_password_function_wait_txt'] = 'You cannot request a new password yet. Please wait a few minutes.';
3233
$wb['lost_password_function_expired_txt'] = 'This activation link has expired. Please request a new one.';
3334
$wb['lost_password_function_denied_txt'] = 'This activation link is not valid.';
3435
?>

0 commit comments

Comments
 (0)