diff options
Diffstat (limited to 'plugins/password')
68 files changed, 301 insertions, 408 deletions
diff --git a/plugins/password/README b/plugins/password/README index 89ffeb320..936aa53cc 100644 --- a/plugins/password/README +++ b/plugins/password/README @@ -311,6 +311,9 @@ Set $config['password_vpopmaild_port'] to the port of vpopmaild. + Set $config['password_vpopmaild_timeout'] to the timeout used for the TCP + connection to vpopmaild (You may want to set it higher on busy servers). + 2.20. Plesk (Plesk RPC-API) --------------------------- diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index 427d064a8..6610b4dae 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -35,6 +35,9 @@ $config['password_hosts'] = null; // for upgrading the stored passwords after the encryption scheme has changed. $config['password_force_save'] = false; +// Enables forcing new users to change their password at their first login. +$config['password_force_new_user'] = false; + // SQL Driver options // ------------------ @@ -256,6 +259,9 @@ $config['password_vpopmaild_host'] = 'localhost'; // TCP port used for vpopmaild connections $config['password_vpopmaild_port'] = 89; +// Timout used for the connection to vpopmaild (in seconds) +$config['password_vpopmaild_timeout'] = 10; + // cPanel Driver options // -------------------------- @@ -362,6 +368,11 @@ $config['password_smb_host'] = 'localhost'; // Location of smbpasswd binary $config['password_smb_cmd'] = '/usr/bin/smbpasswd'; +// gearman driver options +// --------------------- +// Gearman host (default: localhost) +$config['password_gearman_host'] = 'localhost'; + // Plesk/PPA Driver options diff --git a/plugins/password/drivers/gearman.php b/plugins/password/drivers/gearman.php new file mode 100644 index 000000000..36571a98f --- /dev/null +++ b/plugins/password/drivers/gearman.php @@ -0,0 +1,55 @@ +<?php + +/** + * Gearman Password Driver + * + * Payload is json string containing username, oldPassword and newPassword + * Return value is a json string saying result: true if success. + * + * @version 1.0 + * @author Mohammad Anwari <mdamt@mdamt.net> + */ + +class rcube_gearman_password +{ + function save($currpass, $newpass) + { + if (extension_loaded('gearman')) { + $rcmail = rcmail::get_instance(); + $user = $_SESSION['username']; + $payload = array( + 'username' => $user, + 'oldPassword' => $currpass, + 'newPassword' => $newpass, + ); + + $gmc = new GearmanClient(); + $gmc->addServer($rcmail->config->get('password_gearman_host')); + + $result = $gmc->doNormal('setPassword', json_encode($payload)); + $success = json_decode($result); + + if ($success && $success->result == 1) { + return PASSWORD_SUCCESS; + } + else { + rcube::raise_error(array( + 'code' => 600, + 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Password plugin: Gearman authentication failed for user $user: $error" + ), true, false); + } + } + else { + rcube::raise_error(array( + 'code' => 600, + 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Password plugin: PECL Gearman module not loaded" + ), true, false); + } + + return PASSWORD_ERROR; + } +} diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index 739958ad7..cc62595b5 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -130,9 +130,10 @@ class rcube_ldap_password */ function search_userdn($rcmail) { + $binddn = $rcmail->config->get('password_ldap_searchDN'); + $bindpw = $rcmail->config->get('password_ldap_searchPW'); + $ldapConfig = array ( - 'binddn' => $rcmail->config->get('password_ldap_searchDN'), - 'bindpw' => $rcmail->config->get('password_ldap_searchPW'), 'basedn' => $rcmail->config->get('password_ldap_basedn'), 'host' => $rcmail->config->get('password_ldap_host'), 'port' => $rcmail->config->get('password_ldap_port'), @@ -140,6 +141,12 @@ class rcube_ldap_password 'version' => $rcmail->config->get('password_ldap_version'), ); + // allow anonymous searches + if (!empty($binddn)) { + $ldapConfig['binddn'] = $binddn; + $ldapConfig['bindpw'] = $bindpw; + } + $ldap = Net_LDAP2::connect($ldapConfig); if (PEAR::isError($ldap)) { diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index 3e167ea5b..3c19ccde5 100644 --- a/plugins/password/drivers/ldap_simple.php +++ b/plugins/password/drivers/ldap_simple.php @@ -168,14 +168,16 @@ class rcube_ldap_simple_password */ function search_userdn($rcmail, $ds) { - $search_user = $rcmail->config->get('password_ldap_searchDN'); - $search_pass = $rcmail->config->get('password_ldap_searchPW'); + $search_user = $rcmail->config->get('password_ldap_searchDN'); + $search_pass = $rcmail->config->get('password_ldap_searchPW'); + $search_base = $rcmail->config->get('password_ldap_search_base'); + $search_filter = $rcmail->config->get('password_ldap_search_filter'); - if (empty($search_user)) { - return null; + if (empty($search_filter)) { + return false; } - $this->_debug("C: Bind $search_user, pass: **** [" . strlen($search_pass) . "]"); + $this->_debug("C: Bind " . ($search_user ? $search_user : '[anonymous]')); // Bind if (!ldap_bind($ds, $search_user, $search_pass)) { @@ -185,9 +187,6 @@ class rcube_ldap_simple_password $this->_debug("S: OK"); - $search_base = $rcmail->config->get('password_ldap_search_base'); - $search_filter = $rcmail->config->get('password_ldap_search_filter'); - $search_base = rcube_ldap_password::substitute_vars($search_base); $search_filter = rcube_ldap_password::substitute_vars($search_filter); diff --git a/plugins/password/drivers/vpopmaild.php b/plugins/password/drivers/vpopmaild.php index 6c1a9ee9d..40731206a 100644 --- a/plugins/password/drivers/vpopmaild.php +++ b/plugins/password/drivers/vpopmaild.php @@ -22,6 +22,8 @@ class rcube_vpopmaild_password $rcmail->config->get('password_vpopmaild_port'), null))) { return PASSWORD_CONNECT_ERROR; } + + $vpopmaild->setTimeout($rcmail->config->get('password_vpopmaild_timeout'),0); $result = $vpopmaild->readLine(); if(!preg_match('/^\+OK/', $result)) { diff --git a/plugins/password/localization/ar.inc b/plugins/password/localization/ar.inc index 521127a8f..db7c424cd 100644 --- a/plugins/password/localization/ar.inc +++ b/plugins/password/localization/ar.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'تغيير كلمة المرور'; $labels['curpasswd'] = 'كلمة المرور الحالية:'; $labels['newpasswd'] = 'كلمة المرور الجديدة:'; $labels['confpasswd'] = 'تأكيد كلمة المرور الجديدة:'; diff --git a/plugins/password/localization/ast.inc b/plugins/password/localization/ast.inc index 99b283ec5..aae336854 100644 --- a/plugins/password/localization/ast.inc +++ b/plugins/password/localization/ast.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Camudar contraseña'; $labels['curpasswd'] = 'Contraseña actual:'; $labels['newpasswd'] = 'Contraseña nueva:'; $labels['confpasswd'] = 'Confirmar contraseña:'; @@ -28,5 +27,6 @@ $messages['connecterror'] = 'Nun pudo guardase la contraseña nueva. Fallu de co $messages['internalerror'] = 'Nun pudo guardase la contraseña nueva. '; $messages['passwordshort'] = 'La contraseña tien de tener polo menos $length caráuteres.'; $messages['passwordweak'] = 'La contraseña tien de tener polo menos un númberu y un signu de puntuación.'; -$messages['passwordforbidden'] = 'La contraseña que s\'introduxo contién caráuteres non permitíos.'; +$messages['passwordforbidden'] = 'La contraseña contien caráuteres prohibíos.'; +$messages['firstloginchange'] = 'Esti ye\'l to primer aniciu sesión. Por favor, camuda la to contraseña.'; ?> diff --git a/plugins/password/localization/az_AZ.inc b/plugins/password/localization/az_AZ.inc index 18fa758f4..01bb7a91e 100644 --- a/plugins/password/localization/az_AZ.inc +++ b/plugins/password/localization/az_AZ.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Şifrəni dəyiş'; $labels['curpasswd'] = 'Hal-hazırki şifrə:'; $labels['newpasswd'] = 'Yeni şifrə:'; $labels['confpasswd'] = 'Yeni şifrə: (təkrar)'; diff --git a/plugins/password/localization/be_BE.inc b/plugins/password/localization/be_BE.inc index 457e67e9e..4ac446134 100644 --- a/plugins/password/localization/be_BE.inc +++ b/plugins/password/localization/be_BE.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Не ўдалося захаваць новы па $messages['passwordshort'] = 'Пароль мусіць быць мінімум $length знакаў.'; $messages['passwordweak'] = 'Пароль мусіць утрымліваць мінімум адну лічбу і адзін знак пунктуацыі.'; $messages['passwordforbidden'] = 'Пароль утрымлівае забароненыя знакі.'; +$messages['firstloginchange'] = 'Гэта ваш першы ўваход. Трэба змяніць пароль.'; ?> diff --git a/plugins/password/localization/bg_BG.inc b/plugins/password/localization/bg_BG.inc index c1c8b9b7a..d543b5548 100644 --- a/plugins/password/localization/bg_BG.inc +++ b/plugins/password/localization/bg_BG.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Промяна на парола'; $labels['curpasswd'] = 'Текуща парола:'; $labels['newpasswd'] = 'Нова парола:'; $labels['confpasswd'] = 'Повторно нова парола:'; diff --git a/plugins/password/localization/br.inc b/plugins/password/localization/br.inc index a43b0b715..ff8869713 100644 --- a/plugins/password/localization/br.inc +++ b/plugins/password/localization/br.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Kemmañ ar ger-tremen'; $labels['curpasswd'] = 'Ger-tremen bremañ :'; $labels['newpasswd'] = 'Ger-tremen nevez :'; $labels['confpasswd'] = 'Kadarnaat ar ger-tremen :'; diff --git a/plugins/password/localization/bs_BA.inc b/plugins/password/localization/bs_BA.inc index f030fef87..6ca96aa1b 100644 --- a/plugins/password/localization/bs_BA.inc +++ b/plugins/password/localization/bs_BA.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Nije moguće sačuvati novu šifru.'; $messages['passwordshort'] = 'Šifra mora sadržavati barem $length znakova.'; $messages['passwordweak'] = 'Šifra mora imati barem jedan broj i jedan interpunkcijski znak.'; $messages['passwordforbidden'] = 'Šifra sadrži nedozvoljene znakove.'; +$messages['firstloginchange'] = 'Ovo je vaša prva prijava. Molimo vas da promijenite vašu šifru.'; ?> diff --git a/plugins/password/localization/ca_ES.inc b/plugins/password/localization/ca_ES.inc index 8e367155f..d74a4dc50 100644 --- a/plugins/password/localization/ca_ES.inc +++ b/plugins/password/localization/ca_ES.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'No s\'ha pogut desar la nova contrasenya.'; $messages['passwordshort'] = 'La nova contrasenya ha de tenir com a mínim $length caràcters.'; $messages['passwordweak'] = 'La nova contrasenya ha d\'incloure com a mínim un nombre i un caràcter de puntuació.'; $messages['passwordforbidden'] = 'La contrasenya conté caràcters no permesos.'; +$messages['firstloginchange'] = 'Aquest és el vostre primer accés. Si us plau, canvieu-vos la contrasenya.'; ?> diff --git a/plugins/password/localization/cs_CZ.inc b/plugins/password/localization/cs_CZ.inc index 46076b0a0..45870a35c 100644 --- a/plugins/password/localization/cs_CZ.inc +++ b/plugins/password/localization/cs_CZ.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Heslo se nepodařilo uložit.'; $messages['passwordshort'] = 'Heslo musí mít alespoň $length znaků.'; $messages['passwordweak'] = 'Heslo musí obsahovat alespoň jedno číslo a jedno interpuknční znaménko.'; $messages['passwordforbidden'] = 'Heslo obsahuje nepovolené znaky.'; +$messages['firstloginchange'] = 'Vaše první přihlášení, změňte si prosím heslo.'; ?> diff --git a/plugins/password/localization/cy_GB.inc b/plugins/password/localization/cy_GB.inc index 16fc65447..3de8189f9 100644 --- a/plugins/password/localization/cy_GB.inc +++ b/plugins/password/localization/cy_GB.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Newid Cyfrinair'; $labels['curpasswd'] = 'Cyfrinair Presennol:'; $labels['newpasswd'] = 'Cyfrinair Newydd:'; $labels['confpasswd'] = 'Cadarnhau Cyfrinair Newydd:'; diff --git a/plugins/password/localization/da_DK.inc b/plugins/password/localization/da_DK.inc index 76e161db4..c0bc3831d 100644 --- a/plugins/password/localization/da_DK.inc +++ b/plugins/password/localization/da_DK.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Skift adgangskode'; $labels['curpasswd'] = 'Nuværende adgangskode:'; $labels['newpasswd'] = 'Ny adgangskode:'; $labels['confpasswd'] = 'Bekræft ny adgangskode:'; diff --git a/plugins/password/localization/de_CH.inc b/plugins/password/localization/de_CH.inc index a446e1b52..8d137d561 100644 --- a/plugins/password/localization/de_CH.inc +++ b/plugins/password/localization/de_CH.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Passwort ändern'; $labels['curpasswd'] = 'Aktuelles Passwort'; $labels['newpasswd'] = 'Neues Passwort'; $labels['confpasswd'] = 'Passwort Wiederholung'; diff --git a/plugins/password/localization/de_DE.inc b/plugins/password/localization/de_DE.inc index fab78fce9..edf60a7ca 100644 --- a/plugins/password/localization/de_DE.inc +++ b/plugins/password/localization/de_DE.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Kennwort ändern'; +$labels['changepasswd'] = 'Passwort ändern'; $labels['curpasswd'] = 'Aktuelles Kennwort:'; $labels['newpasswd'] = 'Neues Kennwort:'; $labels['confpasswd'] = 'Neues Kennwort bestätigen:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Neues Passwort nicht gespeichert'; $messages['passwordshort'] = 'Passwort muss mindestens $length Zeichen lang sein.'; $messages['passwordweak'] = 'Passwort muss mindestens eine Zahl und ein Sonderzeichen enthalten.'; $messages['passwordforbidden'] = 'Passwort enthält unzulässige Zeichen.'; +$messages['firstloginchange'] = 'Dies ist Ihr erster Login. Bitte ändern Sie ihr Passwort.'; ?> diff --git a/plugins/password/localization/el_GR.inc b/plugins/password/localization/el_GR.inc index b1c72ab69..5f7801635 100644 --- a/plugins/password/localization/el_GR.inc +++ b/plugins/password/localization/el_GR.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Αλλαγη κωδικου προσβασης'; $labels['curpasswd'] = 'Τρεχων κωδικος προσβασης:'; $labels['newpasswd'] = 'Νεος κωδικος προσβασης:'; $labels['confpasswd'] = 'Επιβεβαιωση κωδικου προσβασης:'; diff --git a/plugins/password/localization/en_CA.inc b/plugins/password/localization/en_CA.inc index 6206b5923..e67ee7bfe 100644 --- a/plugins/password/localization/en_CA.inc +++ b/plugins/password/localization/en_CA.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Change Password'; $labels['curpasswd'] = 'Current Password:'; $labels['newpasswd'] = 'New Password:'; $labels['confpasswd'] = 'Confirm New Password:'; diff --git a/plugins/password/localization/en_GB.inc b/plugins/password/localization/en_GB.inc index 1f1b4e286..533bcd0bc 100644 --- a/plugins/password/localization/en_GB.inc +++ b/plugins/password/localization/en_GB.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Change Password'; $labels['curpasswd'] = 'Current Password:'; $labels['newpasswd'] = 'New Password:'; $labels['confpasswd'] = 'Confirm New Password:'; diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc index a4c077fe5..278a20374 100644 --- a/plugins/password/localization/en_US.inc +++ b/plugins/password/localization/en_US.inc @@ -17,7 +17,7 @@ */ $labels = array(); -$labels['changepasswd'] = 'Change Password'; +$labels['changepasswd'] = 'Change password'; $labels['curpasswd'] = 'Current Password:'; $labels['newpasswd'] = 'New Password:'; $labels['confpasswd'] = 'Confirm New Password:'; @@ -33,5 +33,6 @@ $messages['internalerror'] = 'Could not save new password.'; $messages['passwordshort'] = 'Password must be at least $length characters long.'; $messages['passwordweak'] = 'Password must include at least one number and one punctuation character.'; $messages['passwordforbidden'] = 'Password contains forbidden characters.'; +$messages['firstloginchange'] = 'This is your first login. Please change your password.'; ?> diff --git a/plugins/password/localization/eo.inc b/plugins/password/localization/eo.inc index d985c18e6..214a68dac 100644 --- a/plugins/password/localization/eo.inc +++ b/plugins/password/localization/eo.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Ŝanĝi pasvorton'; $labels['curpasswd'] = 'Nuna pasvorto:'; $labels['newpasswd'] = 'Nova pasvorto:'; $labels['confpasswd'] = 'Konfirmi novan pasvorton:'; diff --git a/plugins/password/localization/es_419.inc b/plugins/password/localization/es_419.inc index 3d99b561c..4c2a2cd38 100644 --- a/plugins/password/localization/es_419.inc +++ b/plugins/password/localization/es_419.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'No se puedo guardar la nueva contraseña.'; $messages['passwordshort'] = 'La contraseña debe tener al menos $length carácteres.'; $messages['passwordweak'] = 'La contraseña debe incluir por lo menos un número y un signo de puntuación.'; $messages['passwordforbidden'] = 'La contraseña contiene carácteres ilegales.'; +$messages['firstloginchange'] = 'Esta es la primera vez que ingresas. Por favor cambia tu contraseña.'; ?> diff --git a/plugins/password/localization/es_AR.inc b/plugins/password/localization/es_AR.inc index 47589cfc7..ea043625f 100644 --- a/plugins/password/localization/es_AR.inc +++ b/plugins/password/localization/es_AR.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Cambiar Contraseña'; +$labels['changepasswd'] = 'Cambiar contraseña'; $labels['curpasswd'] = 'Contraseña Actual:'; $labels['newpasswd'] = 'Contraseña Nueva:'; $labels['confpasswd'] = 'Confirmar Contraseña:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'No se pudo guardar la contraseña nueva.'; $messages['passwordshort'] = 'Tu contraseña debe tener una longitud mínima de $length.'; $messages['passwordweak'] = 'Tu nueva contraseña debe incluir al menos un número y un signo de puntuación.'; $messages['passwordforbidden'] = 'La contraseña contiene caracteres inválidos.'; +$messages['firstloginchange'] = 'Este es tu primer inicio de sesión. Por favor, cambia tu contraseña.'; ?> diff --git a/plugins/password/localization/es_ES.inc b/plugins/password/localization/es_ES.inc index 80ee2e9a1..cededcd8b 100644 --- a/plugins/password/localization/es_ES.inc +++ b/plugins/password/localization/es_ES.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Cambiar contraseña'; +$labels['changepasswd'] = 'Cambiar la contraseña'; $labels['curpasswd'] = 'Contraseña actual:'; $labels['newpasswd'] = 'Contraseña nueva:'; $labels['confpasswd'] = 'Confirmar contraseña:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'No se pudo guardar la contraseña nueva.'; $messages['passwordshort'] = 'La contraseña debe tener por lo menos $length caracteres.'; $messages['passwordweak'] = 'La contraseña debe incluir al menos un número y un signo de puntuación.'; $messages['passwordforbidden'] = 'La contraseña introducida contiene caracteres no permitidos.'; +$messages['firstloginchange'] = 'Este es su primer inicio de sesión. Por favor, cambie su contraseña.'; ?> diff --git a/plugins/password/localization/et_EE.inc b/plugins/password/localization/et_EE.inc index e1c524dcf..a2c0319b2 100644 --- a/plugins/password/localization/et_EE.inc +++ b/plugins/password/localization/et_EE.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Muuda parooli'; $labels['curpasswd'] = 'Vana parool:'; $labels['newpasswd'] = 'Uus parool:'; $labels['confpasswd'] = 'Uus parool uuesti:'; diff --git a/plugins/password/localization/eu_ES.inc b/plugins/password/localization/eu_ES.inc index b814d2983..7f93d0110 100644 --- a/plugins/password/localization/eu_ES.inc +++ b/plugins/password/localization/eu_ES.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Ezin izan da pasahitz berria gorde.'; $messages['passwordshort'] = 'Gutxienez $length karakteretakoa izan behar du pasahitzak.'; $messages['passwordweak'] = 'Gutxienez zenbaki bat eta puntuazio karaktere bat izan behar du pasahitzak.'; $messages['passwordforbidden'] = 'Galarazitako karaktereak daude pasahitzean.'; +$messages['firstloginchange'] = 'Zure lehenengo sarrera da. Pasahitza aldatu mesedez.'; ?> diff --git a/plugins/password/localization/fa_AF.inc b/plugins/password/localization/fa_AF.inc index 5bf7c3a8f..3df6a3057 100644 --- a/plugins/password/localization/fa_AF.inc +++ b/plugins/password/localization/fa_AF.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'تغییر رمز عبور'; $labels['curpasswd'] = 'رمز عبور کنونی'; $labels['newpasswd'] = 'رمز عبور جدید'; $labels['confpasswd'] = 'تایید رمز عبور جدید'; diff --git a/plugins/password/localization/fi_FI.inc b/plugins/password/localization/fi_FI.inc index 3b6735bec..5cf0db192 100644 --- a/plugins/password/localization/fi_FI.inc +++ b/plugins/password/localization/fi_FI.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Uuden salasanan tallennus epäonnistui.'; $messages['passwordshort'] = 'Salasanassa täytyy olla vähintään $length merkkiä.'; $messages['passwordweak'] = 'Salasanan täytyy sisältää vähintään yksi numero ja yksi välimerkki.'; $messages['passwordforbidden'] = 'Salasana sisältää virheellisiä merkkejä.'; +$messages['firstloginchange'] = 'Tämä on ensimmäinen kirjautumiskertasi. Vaihda salasanasi.'; ?> diff --git a/plugins/password/localization/fo_FO.inc b/plugins/password/localization/fo_FO.inc index 7c9ba55bc..875f79b69 100644 --- a/plugins/password/localization/fo_FO.inc +++ b/plugins/password/localization/fo_FO.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Broyt loyniorð'; $labels['curpasswd'] = 'Nú verandi loyniorð:'; $labels['newpasswd'] = 'Nýtt loyniorð:'; $labels['confpasswd'] = 'Endurtak nýggja loyniorð:'; diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc index 1415366a3..b0f5e39b2 100644 --- a/plugins/password/localization/gl_ES.inc +++ b/plugins/password/localization/gl_ES.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Non foi posíbel gardar o contrasinal novo.'; $messages['passwordshort'] = 'O contrasinal debe ter polo menos $length caracteres.'; $messages['passwordweak'] = 'O contrasinal debe incluir polo menos un número e un signo de puntuación.'; $messages['passwordforbidden'] = 'O contrasinal contén caracteres non permitidos.'; +$messages['firstloginchange'] = 'É a primeira vez que se conecta. Por favor, troque o seu contrasinal.'; ?> diff --git a/plugins/password/localization/he_IL.inc b/plugins/password/localization/he_IL.inc index ce05ea59c..c60acd7c1 100644 --- a/plugins/password/localization/he_IL.inc +++ b/plugins/password/localization/he_IL.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'שינוי סיסמה'; +$labels['changepasswd'] = 'שנה סיסמה'; $labels['curpasswd'] = 'סיסמה נוכחית:'; $labels['newpasswd'] = 'סיסמה חדשה:'; $labels['confpasswd'] = 'אימות הסיסמה החדשה:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'לא ניתן לשמור על הסיסמה החד $messages['passwordshort'] = 'הסיסמה צריכה להיות לפחות בעלת $length תווים'; $messages['passwordweak'] = 'הסיסמה חייבת לכלול לפחות סיפרה אחת ולפחות סימן פיסוק אחד.'; $messages['passwordforbidden'] = 'הסיסמה מכילה תווים אסורים.'; +$messages['firstloginchange'] = 'זוהי כניסתך הראשונה. אנא שנה את סיסמתך.'; ?> diff --git a/plugins/password/localization/hr_HR.inc b/plugins/password/localization/hr_HR.inc index 44b62b2af..9815bf504 100644 --- a/plugins/password/localization/hr_HR.inc +++ b/plugins/password/localization/hr_HR.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Promijeni zaporku'; $labels['curpasswd'] = 'Važeća zaporka:'; $labels['newpasswd'] = 'Nova zaporka:'; $labels['confpasswd'] = 'Potvrda nove zaporke:'; diff --git a/plugins/password/localization/hu_HU.inc b/plugins/password/localization/hu_HU.inc index e9167b0c9..beb9703a3 100644 --- a/plugins/password/localization/hu_HU.inc +++ b/plugins/password/localization/hu_HU.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Jelszó módosítás'; $labels['curpasswd'] = 'Jelenlegi jelszó:'; $labels['newpasswd'] = 'Új jelszó:'; $labels['confpasswd'] = 'Új jelszó mégegyszer:'; @@ -29,4 +28,5 @@ $messages['internalerror'] = 'Hiba történt a kérés feldolgozása során.'; $messages['passwordshort'] = 'A jelszónak legalább $length karakter hosszunak kell lennie.'; $messages['passwordweak'] = 'A jelszónak mindenképpen kell tartalmaznia egy számot és egy írásjelet.'; $messages['passwordforbidden'] = 'A jelszó tiltott karaktert is tartalmaz.'; +$messages['firstloginchange'] = 'Ez az első belépésed. Változtass jelszót.'; ?> diff --git a/plugins/password/localization/hy_AM.inc b/plugins/password/localization/hy_AM.inc index ebca6cd85..9e40b49f5 100644 --- a/plugins/password/localization/hy_AM.inc +++ b/plugins/password/localization/hy_AM.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Գաղտնաբառի փոփոխում'; $labels['curpasswd'] = 'Առկա գաղտնաբառը`'; $labels['newpasswd'] = 'Նոր գաղտնաբառը`'; $labels['confpasswd'] = 'Կրկնեք նոր գաղտնաբառը`'; diff --git a/plugins/password/localization/id_ID.inc b/plugins/password/localization/id_ID.inc index b7b0cde8c..3a42abdf3 100644 --- a/plugins/password/localization/id_ID.inc +++ b/plugins/password/localization/id_ID.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Ubah Sandi'; $labels['curpasswd'] = 'Sandi saat ini:'; $labels['newpasswd'] = 'Sandi Baru:'; $labels['confpasswd'] = 'Konfirmasi Sandi Baru:'; diff --git a/plugins/password/localization/it_IT.inc b/plugins/password/localization/it_IT.inc index ddb83ca82..d9bdb4fd5 100644 --- a/plugins/password/localization/it_IT.inc +++ b/plugins/password/localization/it_IT.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Impossibile salvare la nuova password.'; $messages['passwordshort'] = 'La password deve essere lunga almeno $length caratteri.'; $messages['passwordweak'] = 'La password deve includere almeno una cifra decimale e un simbolo di punteggiatura.'; $messages['passwordforbidden'] = 'La password contiene caratteri proibiti.'; +$messages['firstloginchange'] = 'Questo è il tuo primo accesso. Si prega di cambiare la propria password.'; ?> diff --git a/plugins/password/localization/ja_JP.inc b/plugins/password/localization/ja_JP.inc index cc5a1173d..7c97215c3 100644 --- a/plugins/password/localization/ja_JP.inc +++ b/plugins/password/localization/ja_JP.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = '新しいパスワードを保存できません $messages['passwordshort'] = 'パスワードは少なくとも $length 文字の長さが必要です。'; $messages['passwordweak'] = 'パスワードは少なくとも数字の 1 文字と記号の 1 文字を含んでいなければなりません。'; $messages['passwordforbidden'] = 'パスワードに禁止された文字が含まれています。'; +$messages['firstloginchange'] = 'これは初めてのログインです。パスワードを変更してください。'; ?> diff --git a/plugins/password/localization/km_KH.inc b/plugins/password/localization/km_KH.inc index f223dc653..5e92faf41 100644 --- a/plugins/password/localization/km_KH.inc +++ b/plugins/password/localization/km_KH.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'ប្ដូរពាក្យសម្ងាត់'; $labels['curpasswd'] = 'ពាក្យសម្ងាត់បច្ចុប្បន្ន៖'; $labels['newpasswd'] = 'ពាក្យសម្ងាត់ថ្មី៖'; $labels['confpasswd'] = 'បញ្ជាក់ពាក្យសម្ងាត់ថ្មី៖'; diff --git a/plugins/password/localization/ko_KR.inc b/plugins/password/localization/ko_KR.inc index 21e2dbbf8..1d6374295 100644 --- a/plugins/password/localization/ko_KR.inc +++ b/plugins/password/localization/ko_KR.inc @@ -17,16 +17,17 @@ */ $labels['changepasswd'] = '암호 변경'; $labels['curpasswd'] = '현재 암호:'; -$labels['newpasswd'] = '새 암호:'; -$labels['confpasswd'] = '새로운 비밀번호 확인 :'; -$messages['nopassword'] = '새 암호를 입력하시오.'; -$messages['nocurpassword'] = '현재 사용중인 암호를 입력하세요.'; -$messages['passwordincorrect'] = '현재 사용중인 암호가 올바르지 않습니다.'; -$messages['passwordinconsistency'] = '암호가 일치하지 않습니다. 다시 시도하기 바랍니다.'; -$messages['crypterror'] = '새로운 암호를 저장할 수 없습니다. 암호화 실패.'; -$messages['connecterror'] = '새로운 암호를 저장할 수 없습니다. 연결 오류.'; +$labels['newpasswd'] = '새로운 암호:'; +$labels['confpasswd'] = '새로운 암호 확인:'; +$messages['nopassword'] = '새로운 암호를 입력하세요.'; +$messages['nocurpassword'] = '현재 사용 중인 암호를 입력하세요.'; +$messages['passwordincorrect'] = '현재 사용 중인 암호가 올바르지 않습니다.'; +$messages['passwordinconsistency'] = '암호가 일치하지 않습니다. 다시 시도해주세요.'; +$messages['crypterror'] = '새로운 암호를 저장할 수 없습니다. 암호화 기능이 누락되었습니다.'; +$messages['connecterror'] = '새로운 암호를 저장할 수 없습니다. 연결 오류입니다.'; $messages['internalerror'] = '새로운 암호를 저장할 수 없습니다.'; -$messages['passwordshort'] = '암호는 적어도 $length 글자 이상이어야 합니다.'; -$messages['passwordweak'] = '암호는 적어도 숫자 하나와 특수 문자 하나를 포함하여야 합니다.'; -$messages['passwordforbidden'] = '암호가 허락되지 않은 문자들을 포함하고 있습니다.'; +$messages['passwordshort'] = '암호는 문자가 $length개 이상이어야 합니다.'; +$messages['passwordweak'] = '암호는 숫자 및 특수문자를 각각 한 개 이상 포함해야 합니다.'; +$messages['passwordforbidden'] = '암호가 금지된 문자을 포함하고 있습니다.'; +$messages['firstloginchange'] = '처음 로그인하셨습니다. 암호를 변경해주세요.'; ?> diff --git a/plugins/password/localization/ku.inc b/plugins/password/localization/ku.inc deleted file mode 100644 index 544626846..000000000 --- a/plugins/password/localization/ku.inc +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/* - +-----------------------------------------------------------------------+ - | plugins/password/localization/<lang>.inc | - | | - | Localization file of the Roundcube Webmail Password plugin | - | Copyright (C) 2012-2013, The Roundcube Dev Team | - | | - | Licensed under the GNU General Public License version 3 or | - | any later version with exceptions for skins & plugins. | - | See the README file for a full license statement. | - | | - +-----------------------------------------------------------------------+ - - For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ -*/ -$labels['changepasswd'] = 'گۆڕینی ووشەی نهێنی'; -?> diff --git a/plugins/password/localization/lb_LU.inc b/plugins/password/localization/lb_LU.inc index 08026f242..2093b82ab 100644 --- a/plugins/password/localization/lb_LU.inc +++ b/plugins/password/localization/lb_LU.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Passwuert änneren'; $labels['curpasswd'] = 'Aktuellt Passwuert:'; $labels['newpasswd'] = 'Neit Passwuert:'; $labels['confpasswd'] = 'Neit Passwuert bestätegen:'; diff --git a/plugins/password/localization/lt_LT.inc b/plugins/password/localization/lt_LT.inc index 4425d63e0..3351c305e 100644 --- a/plugins/password/localization/lt_LT.inc +++ b/plugins/password/localization/lt_LT.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Slaptažodžio keitimas'; +$labels['changepasswd'] = 'Keisti slaptažodį'; $labels['curpasswd'] = 'Dabartinis slaptažodis:'; $labels['newpasswd'] = 'Naujasis slaptažodis:'; $labels['confpasswd'] = 'Pakartokite naująjį slaptažodį:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Nepavyko įrašyti naujojo slaptažodžio.'; $messages['passwordshort'] = 'Slaptažodis turi būti sudarytas bent iš $length simbolių.'; $messages['passwordweak'] = 'Slaptažodyje turi būti bent vienas skaitmuo ir vienas skyrybos ženklas.'; $messages['passwordforbidden'] = 'Slaptažodyje rasta neleistinų simbolių.'; +$messages['firstloginchange'] = 'Tai yra pirmasis jūsų prisijungimas. Prašau, pasikeiskite savo slaptažodį.'; ?> diff --git a/plugins/password/localization/lv_LV.inc b/plugins/password/localization/lv_LV.inc index c45bc8314..9e0e0e740 100644 --- a/plugins/password/localization/lv_LV.inc +++ b/plugins/password/localization/lv_LV.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Nomainīt paroli'; $labels['curpasswd'] = 'Pašreizējā parole:'; $labels['newpasswd'] = 'Jaunā parole:'; $labels['confpasswd'] = 'Apstiprināt jauno paroli:'; diff --git a/plugins/password/localization/ml_IN.inc b/plugins/password/localization/ml_IN.inc new file mode 100644 index 000000000..6b8ac9e32 --- /dev/null +++ b/plugins/password/localization/ml_IN.inc @@ -0,0 +1,33 @@ +<?php + +/* + +-----------------------------------------------------------------------+ + | plugins/password/localization/<lang>.inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012-2013, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ +$labels['changepasswd'] = 'രഹസ്യവാക്ക് മാറ്റുക'; +$labels['curpasswd'] = 'ഇപ്പോഴത്തെ രഹസ്യവാക്ക്'; +$labels['newpasswd'] = 'പുതിയ രഹസ്യവാക്ക്'; +$labels['confpasswd'] = 'പുതിയ രഹസ്യവാക്ക് സ്ഥിരീകരിക്കുക'; +$messages['nopassword'] = 'ദയവായി പുതിയ രഹസ്യവാക്ക് നൽകുക'; +$messages['nocurpassword'] = 'ദയവായി ഇപ്പോഴത്തെ രഹസ്യവാക്ക് നൽകുക'; +$messages['passwordincorrect'] = 'ഇപ്പോഴത്തെ രഹസ്യവാക്ക് തെറ്റാണ്.'; +$messages['passwordinconsistency'] = 'രഹസ്യവാക്കുകൾ ചേരുന്നില്ല, ദയവായി വീണ്ടും ശ്രമിക്കുക'; +$messages['crypterror'] = 'പുതിയ രഹസ്യവാക്ക് സൂക്ഷിക്കാൻ സാധിച്ചില്ല. എൻക്രിപ്ഷൻ ഫങ്ങ്ഷൻ ലഭ്യമല്ല.'; +$messages['connecterror'] = 'പുതിയ രഹസ്യവാക്ക് സൂക്ഷിക്കാൻ സാധിച്ചില്ല. ബന്ധം സ്ഥാപിക്കുന്നതിൽ പിഴവ്.'; +$messages['internalerror'] = 'പുതിയ രഹസ്യവാക്ക് സൂക്ഷിക്കാൻ സാധിച്ചില്ല.'; +$messages['passwordshort'] = 'രഹസ്യവാക്കിനു് കുറഞ്ഞത് $length അക്ഷരങ്ങൾ നീളം വേണം'; +$messages['passwordweak'] = 'രഹസ്യവാക്കിൽ കുറഞ്ഞത് ഒരു സംഖ്യയും, ഒരു പ്രത്യേക അക്ഷരവും വേണം'; +$messages['passwordforbidden'] = 'രഹസ്യവാക്കിൽ അനുവദനീയമല്ലാത്ത അക്ഷരങ്ങൾ ഉണ്ട്'; +$messages['firstloginchange'] = 'ഇത് താങ്കളുടെ ആദ്യത്തെ പ്രവേശനമാണ്. ദയവായി താങ്കളുടെ രഹസ്യവാക്ക് മാറ്റുക.'; +?> diff --git a/plugins/password/localization/nb_NO.inc b/plugins/password/localization/nb_NO.inc index 9901303d2..5d69740f0 100644 --- a/plugins/password/localization/nb_NO.inc +++ b/plugins/password/localization/nb_NO.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Bytt passord'; $labels['curpasswd'] = 'Nåværende passord:'; $labels['newpasswd'] = 'Nytt passord:'; $labels['confpasswd'] = 'Bekreft nytt passord'; diff --git a/plugins/password/localization/nl_NL.inc b/plugins/password/localization/nl_NL.inc index 1b5f0b15b..41ca116cc 100644 --- a/plugins/password/localization/nl_NL.inc +++ b/plugins/password/localization/nl_NL.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Wachtwoord wijzigen'; +$labels['changepasswd'] = 'Wijzig wachtwoord'; $labels['curpasswd'] = 'Huidig wachtwoord:'; $labels['newpasswd'] = 'Nieuw wachtwoord:'; $labels['confpasswd'] = 'Bevestig nieuw wachtwoord:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Uw nieuwe wachtwoord kan niet worden opgeslagen.'; $messages['passwordshort'] = 'Het wachtwoord moet minimaal $length tekens lang zijn.'; $messages['passwordweak'] = 'Het wachtwoord moet minimaal één cijfer en één leesteken bevatten.'; $messages['passwordforbidden'] = 'Het wachtwoord bevat tekens die niet toegestaan zijn.'; +$messages['firstloginchange'] = 'Dit is uw eerste aanmelding. Verander uw wachtwoord alstublieft.'; ?> diff --git a/plugins/password/localization/nn_NO.inc b/plugins/password/localization/nn_NO.inc index 89d0ad1c1..9a8fd78aa 100644 --- a/plugins/password/localization/nn_NO.inc +++ b/plugins/password/localization/nn_NO.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Bytt passord'; $labels['curpasswd'] = 'Noverande passord:'; $labels['newpasswd'] = 'Nytt passord:'; $labels['confpasswd'] = 'Bekreft nytt passord'; diff --git a/plugins/password/localization/pl_PL.inc b/plugins/password/localization/pl_PL.inc index b3ce3726f..00a7aa7e3 100644 --- a/plugins/password/localization/pl_PL.inc +++ b/plugins/password/localization/pl_PL.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Nie udało się zapisać nowego hasła.'; $messages['passwordshort'] = 'Hasło musi posiadać co najmniej $length znaków.'; $messages['passwordweak'] = 'Hasło musi zawierać co najmniej jedną cyfrę i znak interpunkcyjny.'; $messages['passwordforbidden'] = 'Hasło zawiera niedozwolone znaki.'; +$messages['firstloginchange'] = 'To jest twoje pierwsze logowanie. Proszę zmień hasło.'; ?> diff --git a/plugins/password/localization/pt_BR.inc b/plugins/password/localization/pt_BR.inc index ac714764f..1eeccb0b2 100644 --- a/plugins/password/localization/pt_BR.inc +++ b/plugins/password/localization/pt_BR.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Alterar senha'; +$labels['changepasswd'] = 'Alterar a senha'; $labels['curpasswd'] = 'Senha atual:'; $labels['newpasswd'] = 'Nova senha:'; $labels['confpasswd'] = 'Confirmar nova senha:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Não foi possível gravar a nova senha.'; $messages['passwordshort'] = 'A senha precisa ter ao menos $length caracteres.'; $messages['passwordweak'] = 'A senha precisa conter ao menos um número e um caractere de pontuação.'; $messages['passwordforbidden'] = 'A senha contém caracteres proibidos.'; +$messages['firstloginchange'] = 'Este é o seu primeiro acesso. Por favor altere sua senha.'; ?> diff --git a/plugins/password/localization/pt_PT.inc b/plugins/password/localization/pt_PT.inc index fc5b28899..6317ede9c 100644 --- a/plugins/password/localization/pt_PT.inc +++ b/plugins/password/localization/pt_PT.inc @@ -15,18 +15,19 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Alterar password'; -$labels['curpasswd'] = 'Password atual:'; -$labels['newpasswd'] = 'Nova password:'; -$labels['confpasswd'] = 'Confirmar password:'; -$messages['nopassword'] = 'Introduza a nova password.'; -$messages['nocurpassword'] = 'Introduza a password actual.'; -$messages['passwordincorrect'] = 'Password actual errada.'; -$messages['passwordinconsistency'] = 'Password\'s não combinam, tente novamente..'; -$messages['crypterror'] = 'Não foi possível gravar a nova password. Função de criptografica inexistente.'; -$messages['connecterror'] = 'Não foi possível gravar a nova password. Erro de ligação.'; -$messages['internalerror'] = 'Não foi possível gravar a nova password.'; +$labels['changepasswd'] = 'Alterar palavra-passe'; +$labels['curpasswd'] = 'Palavra-passe actual:'; +$labels['newpasswd'] = 'Nova palavra-passe:'; +$labels['confpasswd'] = 'Confirmar palavra-passe:'; +$messages['nopassword'] = 'Introduza a nova palavra-passe.'; +$messages['nocurpassword'] = 'Introduza a palavra-passe actual.'; +$messages['passwordincorrect'] = 'Palavra-passe actual incorrecta.'; +$messages['passwordinconsistency'] = 'As palavras-passe não combinam, tente novamente.'; +$messages['crypterror'] = 'Não foi possível gravar a nova palavra-passe. Função de criptografia inexistente.'; +$messages['connecterror'] = 'Não foi possível gravar a nova palavra-passe. Erro de ligação.'; +$messages['internalerror'] = 'Não foi possível gravar a nova palavra-passe.'; $messages['passwordshort'] = 'A palavra-passe deve ter pelo menos $length caracteres'; $messages['passwordweak'] = 'A palavra-passe deve incluir pelo menos um numero e um sinal de pontuação.'; $messages['passwordforbidden'] = 'A palavra-passe contém caracteres não suportados.'; +$messages['firstloginchange'] = 'Este é o seu primeiro acesso. Por favor, altere a sua palavra-passe.'; ?> diff --git a/plugins/password/localization/ro_RO.inc b/plugins/password/localization/ro_RO.inc index 004254382..74fd80765 100644 --- a/plugins/password/localization/ro_RO.inc +++ b/plugins/password/localization/ro_RO.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Schimbați parola'; +$labels['changepasswd'] = 'Schimbă parola'; $labels['curpasswd'] = 'Parola curentă:'; $labels['newpasswd'] = 'Parola nouă:'; $labels['confpasswd'] = 'Confirmare parola nouă:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Nu am reușit să salvez noua parolă.'; $messages['passwordshort'] = 'Parola trebuie să aibă minim $length caractere.'; $messages['passwordweak'] = 'Parola trebuie să conțina cel puțin un număr si un semn de punctuație.'; $messages['passwordforbidden'] = 'Parola conține caractere nepermise.'; +$messages['firstloginchange'] = 'Aceasta este prima autentificare. Te rugăm să schimbi parola.'; ?> diff --git a/plugins/password/localization/ru_RU.inc b/plugins/password/localization/ru_RU.inc index 85b7bf2c4..d7c03477a 100644 --- a/plugins/password/localization/ru_RU.inc +++ b/plugins/password/localization/ru_RU.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Не могу сохранить новый пар $messages['passwordshort'] = 'Длина пароля должна быть как минимум $length символов.'; $messages['passwordweak'] = 'Пароль должен включать в себя как минимум одну цифру и один знак пунктуации.'; $messages['passwordforbidden'] = 'Пароль содержит недопустимые символы.'; +$messages['firstloginchange'] = 'Вы выполнили вход впервые. Измените ваш пароль.'; ?> diff --git a/plugins/password/localization/sk_SK.inc b/plugins/password/localization/sk_SK.inc index 51339bb7b..4cf8cb91f 100644 --- a/plugins/password/localization/sk_SK.inc +++ b/plugins/password/localization/sk_SK.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Nové heslo nemožno uložiť.'; $messages['passwordshort'] = 'Heslo musí mať najmenej $length znakov.'; $messages['passwordweak'] = 'Heslo musí obsahovať aspoň jedno číslo a jedno interpunkčné znamienko.'; $messages['passwordforbidden'] = 'Heslo obsahuje nepovolené znaky.'; +$messages['firstloginchange'] = 'Prihlásili ste sa po prvýkrát. Prosím zmeňte si prístupové heslo.'; ?> diff --git a/plugins/password/localization/sl_SI.inc b/plugins/password/localization/sl_SI.inc index 99af3c9f5..ec9010c77 100644 --- a/plugins/password/localization/sl_SI.inc +++ b/plugins/password/localization/sl_SI.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Spremeni geslo'; $labels['curpasswd'] = 'Obstoječe geslo:'; $labels['newpasswd'] = 'Novo geslo:'; $labels['confpasswd'] = 'Potrdi novo geslo:'; diff --git a/plugins/password/localization/sr_CS.inc b/plugins/password/localization/sr_CS.inc index 0900b3112..77e2d1251 100644 --- a/plugins/password/localization/sr_CS.inc +++ b/plugins/password/localization/sr_CS.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Промијени лозинку'; $labels['curpasswd'] = 'Тренутна лозинка:'; $labels['newpasswd'] = 'Нова лозинка:'; $labels['confpasswd'] = 'Поновите лозинку:'; diff --git a/plugins/password/localization/sv_SE.inc b/plugins/password/localization/sv_SE.inc index 0aee9da81..26ee37d06 100644 --- a/plugins/password/localization/sv_SE.inc +++ b/plugins/password/localization/sv_SE.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Lösenordet kunde inte ändras.'; $messages['passwordshort'] = 'Lösenordet måste vara minst $length tecken långt.'; $messages['passwordweak'] = 'Lösenordet måste innehålla minst en siffra och ett specialtecken.'; $messages['passwordforbidden'] = 'Lösenordet innehåller otillåtna tecken.'; +$messages['firstloginchange'] = 'Du loggar in för första gången. Vänligen ändra ditt lösenord.'; ?> diff --git a/plugins/password/localization/ti.inc b/plugins/password/localization/ti.inc index 9453318f0..fd334a957 100644 --- a/plugins/password/localization/ti.inc +++ b/plugins/password/localization/ti.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'መሕለፊ ቃል ይለወጥ'; $labels['curpasswd'] = 'ህልው መሕለፊ ቃል:'; $labels['newpasswd'] = 'ሓዱሽ መሕለፊ ቃል:'; $labels['confpasswd'] = 'መረጋገፂ ሓዱሽ መሕለፊ ቃል :'; diff --git a/plugins/password/localization/tr_TR.inc b/plugins/password/localization/tr_TR.inc index 75ee30f6d..37c25c608 100644 --- a/plugins/password/localization/tr_TR.inc +++ b/plugins/password/localization/tr_TR.inc @@ -15,7 +15,7 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Parolayı Değiştir'; +$labels['changepasswd'] = 'Parolayı değiştir'; $labels['curpasswd'] = 'Şimdiki Parola:'; $labels['newpasswd'] = 'Yeni Parola:'; $labels['confpasswd'] = 'Yeni Parolayı Onaylayın:'; @@ -29,4 +29,5 @@ $messages['internalerror'] = 'Yeni parola kaydedilemedi.'; $messages['passwordshort'] = 'Parola en az $length karakterden oluşmalı.'; $messages['passwordweak'] = 'Parola en az bir sayı ve bir noktalama işareti içermeli.'; $messages['passwordforbidden'] = 'Parola uygunsuz karakter(ler) içeriyor.'; +$messages['firstloginchange'] = 'Bu ilk girişiniz. Lütfen parolanızı değiştirin.'; ?> diff --git a/plugins/password/localization/uk_UA.inc b/plugins/password/localization/uk_UA.inc index 0d102e528..d9e96d15e 100644 --- a/plugins/password/localization/uk_UA.inc +++ b/plugins/password/localization/uk_UA.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Змінити пароль'; $labels['curpasswd'] = 'Поточний пароль:'; $labels['newpasswd'] = 'Новий пароль:'; $labels['confpasswd'] = 'Підтвердіть новий пароль:'; diff --git a/plugins/password/localization/vi_VN.inc b/plugins/password/localization/vi_VN.inc index 3e5745f4d..8dcf706d8 100644 --- a/plugins/password/localization/vi_VN.inc +++ b/plugins/password/localization/vi_VN.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = 'Thay đổi mật khẩu'; $labels['curpasswd'] = 'Mật khẩu hiện tại'; $labels['newpasswd'] = 'Mật khẩu mới:'; $labels['confpasswd'] = 'Xác nhận mật khẩu mới'; diff --git a/plugins/password/localization/zh_CN.inc b/plugins/password/localization/zh_CN.inc index 02db6e83e..681e5c7e2 100644 --- a/plugins/password/localization/zh_CN.inc +++ b/plugins/password/localization/zh_CN.inc @@ -15,7 +15,6 @@ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ */ -$labels['changepasswd'] = '修改密码'; $labels['curpasswd'] = '当前密码:'; $labels['newpasswd'] = '新密码:'; $labels['confpasswd'] = '确认新密码:'; diff --git a/plugins/password/localization/zh_TW.inc b/plugins/password/localization/zh_TW.inc index e5e2414f2..22d88f042 100644 --- a/plugins/password/localization/zh_TW.inc +++ b/plugins/password/localization/zh_TW.inc @@ -29,4 +29,5 @@ $messages['internalerror'] = '無法更新密碼'; $messages['passwordshort'] = '您的密碼至少需 $length 個字元長'; $messages['passwordweak'] = '您的新密碼至少需含有一個數字與一個標點符號'; $messages['passwordforbidden'] = '您的密碼含有禁用字元'; +$messages['firstloginchange'] = '這是你第一次登入。請更改你的密碼。'; ?> diff --git a/plugins/password/package.xml b/plugins/password/package.xml index 16eda1ad0..4fa023c77 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -15,9 +15,9 @@ <email>alec@alec.pl</email> <active>yes</active> </lead> - <date>2013-04-28</date> + <date>2014-06-10</date> <version> - <release>3.4</release> + <release>3.5</release> <api>2.0</api> </version> <stability> @@ -25,9 +25,6 @@ <api>stable</api> </stability> <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license> - <notes> -Added password_force_save option - </notes> <contents> <dir baseinstalldir="/" name="/"> <file name="password.php" role="php"> @@ -114,268 +111,4 @@ Added password_force_save option </required> </dependencies> <phprelease/> - <changelog> - <release> - <date>2010-04-29</date> - <time>12:00:00</time> - <version> - <release>1.4</release> - <api>1.4</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Use mail_domain value for domain variables when there is no domain in username: - sql and ldap drivers (#1486694) -- Created package.xml - </notes> - </release> - <release> - <date>2010-06-20</date> - <time>12:00:00</time> - <version> - <release>1.5</release> - <api>1.5</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Removed user_login/username_local/username_domain methods, - use rcube_user::get_username instead (#1486707) - </notes> - </release> - <release> - <date>2010-08-01</date> - <time>09:00:00</time> - <version> - <release>1.6</release> - <api>1.5</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added ldap_simple driver - </notes> - </release> - <release> - <date>2010-09-10</date> - <time>09:00:00</time> - <version> - <release>1.7</release> - <api>1.5</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added XMail driver -- Improve security of chpasswd driver using popen instead of exec+echo (#1486987) -- Added chpass-wrapper.py script to improve security (#1486987) - </notes> - </release> - <release> - <date>2010-09-29</date> - <time>19:00:00</time> - <version> - <release>1.8</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added possibility to display extended error messages (#1486704) -- Added extended error messages in Poppassd driver (#1486704) - </notes> - </release> - <release> - <version> - <release>1.9</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added password_ldap_lchattr option (#1486927) - </notes> - </release> - <release> - <date>2010-10-07</date> - <time>09:00:00</time> - <version> - <release>2.0</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Fixed SQL Injection in SQL driver when using %p or %o variables in query (#1487034) - </notes> - </release> - <release> - <date>2010-11-02</date> - <time>09:00:00</time> - <version> - <release>2.1</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- hMail driver: Add possibility to connect to remote host - </notes> - </release> - <release> - <date>2011-02-15</date> - <time>12:00</time> - <version> - <release>2.2</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- hMail driver: add username_domain detection (#1487100) -- hMail driver: HTML tags in logged messages should be stripped off (#1487099) -- Chpasswd driver: add newline at end of input to chpasswd binary (#1487141) -- Fix usage of configured temp_dir instead of /tmp (#1487447) -- ldap_simple driver: fix parse error -- ldap/ldap_simple drivers: support %dc variable in config -- ldap/ldap_simple drivers: support Samba password change -- Fix extended error messages handling (#1487676) -- Fix double request when clicking on Password tab in Firefox -- Fix deprecated split() usage in xmail and directadmin drivers (#1487769) -- Added option (password_log) for logging password changes -- Virtualmin driver: Add option for setting username format (#1487781) - </notes> - </release> - <release> - <date>2011-10-26</date> - <time>12:00</time> - <version> - <release>2.3</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- When old and new passwords are the same, do nothing, return success (#1487823) -- Fixed Samba password hashing in 'ldap' driver -- Added 'password_change' hook for plugin actions after successful password change -- Fixed bug where 'doveadm pw' command was used as dovecotpw utility -- Improve generated crypt() passwords (#1488136) - </notes> - </release> - <release> - <date>2011-11-23</date> - <version> - <release>2.4</release> - <api>1.6</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added option to use punycode or unicode for domain names (#1488103) -- Save Samba password hashes in capital letters (#1488197) - </notes> - </release> - <release> - <date>2011-11-23</date> - <version> - <release>3.0</release> - <api>2.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Fixed drivers namespace issues - </notes> - </release> - <release> - <date>2012-03-07</date> - <version> - <release>3.1</release> - <api>2.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Added pw_usermod driver (#1487826) -- Added option password_login_exceptions (#1487826) -- Added domainfactory driver (#1487882) -- Added DBMail driver (#1488281) -- Helper files moved to helpers/ directory from drivers/ -- Added Expect driver (#1488363) -- Added Samba password (#1488364) - </notes> - </release> - <release> - <date>2012-11-15</date> - <version> - <release>3.2</release> - <api>2.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -- Fix wrong (non-specific) error message on crypt or connection error (#1488808) -- Added option to define IMAP hosts that support password changes - password_hosts - </notes> - </release> - <release> - <date>2013-03-30</date> - <version> - <release>3.3</release> - <api>2.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> - <notes> -Added new cPanel driver - fixes localization related issues (#1487015) - </notes> - </release> - </changelog> </package> diff --git a/plugins/password/password.js b/plugins/password/password.js index ae494558c..d0fd75a11 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -15,30 +15,33 @@ * for the JavaScript code in this file. */ -if (window.rcmail) { - rcmail.addEventListener('init', function(evt) { - +window.rcmail && rcmail.addEventListener('init', function(evt) { // register command handler - rcmail.register_command('plugin.password-save', function() { - var input_curpasswd = rcube_find_object('_curpasswd'), - input_newpasswd = rcube_find_object('_newpasswd'), - input_confpasswd = rcube_find_object('_confpasswd'); + rcmail.register_command('plugin.password-save', function() { + var input_curpasswd = rcube_find_object('_curpasswd'), + input_newpasswd = rcube_find_object('_newpasswd'), + input_confpasswd = rcube_find_object('_confpasswd'); if (input_curpasswd && input_curpasswd.value == '') { alert(rcmail.gettext('nocurpassword', 'password')); input_curpasswd.focus(); - } else if (input_newpasswd && input_newpasswd.value == '') { + } + else if (input_newpasswd && input_newpasswd.value == '') { alert(rcmail.gettext('nopassword', 'password')); input_newpasswd.focus(); - } else if (input_confpasswd && input_confpasswd.value == '') { + } + else if (input_confpasswd && input_confpasswd.value == '') { alert(rcmail.gettext('nopassword', 'password')); input_confpasswd.focus(); - } else if (input_newpasswd && input_confpasswd && input_newpasswd.value != input_confpasswd.value) { + } + else if (input_newpasswd && input_confpasswd && input_newpasswd.value != input_confpasswd.value) { alert(rcmail.gettext('passwordinconsistency', 'password')); input_newpasswd.focus(); - } else { + } + else { rcmail.gui_objects.passform.submit(); } }, true); - }) -} + + $('input:not(:hidden):first').focus(); +}); diff --git a/plugins/password/password.php b/plugins/password/password.php index 83f951b98..0db57afc6 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -40,74 +40,78 @@ define('PASSWORD_SUCCESS', 0); */ class password extends rcube_plugin { - public $task = 'settings'; + public $task = 'settings|login'; public $noframe = true; public $noajax = true; + private $newuser = false; + function init() { $rcmail = rcmail::get_instance(); $this->load_config(); - // Host exceptions - $hosts = $rcmail->config->get('password_hosts'); - if (!empty($hosts) && !in_array($_SESSION['storage_host'], $hosts)) { - return; - } - - // Login exceptions - if ($exceptions = $rcmail->config->get('password_login_exceptions')) { - $exceptions = array_map('trim', (array) $exceptions); - $exceptions = array_filter($exceptions); - $username = $_SESSION['username']; - - foreach ($exceptions as $ec) { - if ($username === $ec) { - return; - } + if ($rcmail->task == 'settings') { + if (!$this->check_host_login_exceptions()) { + return; } - } - $this->add_hook('settings_actions', array($this, 'settings_actions')); + $this->add_texts('localization/'); - $this->register_action('plugin.password', array($this, 'password_init')); - $this->register_action('plugin.password-save', array($this, 'password_save')); + $this->add_hook('settings_actions', array($this, 'settings_actions')); + $this->register_action('plugin.password', array($this, 'password_init')); + $this->register_action('plugin.password-save', array($this, 'password_save')); - if (strpos($rcmail->action, 'plugin.password') === 0) { - $this->include_script('password.js'); + if (strpos($rcmail->action, 'plugin.password') === 0) { + $this->include_script('password.js'); + } + } + else if ($rcmail->config->get('password_force_new_user')) { + $this->add_hook('user_create', array($this, 'user_create')); + $this->add_hook('login_after', array($this, 'login_after')); } } function settings_actions($args) { // register as settings action - $args['actions'][] = array('action' => 'plugin.password', 'class' => 'password', 'label' => 'password', 'domain' => 'password'); + $args['actions'][] = array( + 'action' => 'plugin.password', + 'class' => 'password', + 'label' => 'password', + 'title' => 'changepasswd', + 'domain' => 'password', + ); + return $args; } function password_init() { - $this->add_texts('localization/'); $this->register_handler('plugin.body', array($this, 'password_form')); $rcmail = rcmail::get_instance(); $rcmail->output->set_pagetitle($this->gettext('changepasswd')); + + if (rcube_utils::get_input_value('_first', rcube_utils::INPUT_GET)) { + $rcmail->output->command('display_message', $this->gettext('firstloginchange'), 'notice'); + } + $rcmail->output->send('plugin'); } function password_save() { - $rcmail = rcmail::get_instance(); - - $this->add_texts('localization/'); $this->register_handler('plugin.body', array($this, 'password_form')); + + $rcmail = rcmail::get_instance(); $rcmail->output->set_pagetitle($this->gettext('changepasswd')); $confirm = $rcmail->config->get('password_confirm_current'); $required_length = intval($rcmail->config->get('password_minimum_length')); - $check_strength = $rcmail->config->get('password_require_nonalpha'); + $check_strength = $rcmail->config->get('password_require_nonalpha'); if (($confirm && !isset($_POST['_curpasswd'])) || !isset($_POST['_newpasswd'])) { $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error'); @@ -222,22 +226,41 @@ class password extends rcube_plugin $table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd')))); $table->add(null, $input_confpasswd->show()); + $rules = ''; + + $required_length = intval($rcmail->config->get('password_minimum_length')); + if ($required_length > 0) { + $rules .= html::tag('li', array('id' => 'required-length'), $this->gettext(array( + 'name' => 'passwordshort', + 'vars' => array('length' => $required_length) + ))); + } + + if ($rcmail->config->get('password_require_nonalpha')) { + $rules .= html::tag('li', array('id' => 'require-nonalpha'), $this->gettext('passwordweak')); + } + + if (!empty($rules)) { + $rules = html::tag('ul', array('id' => 'ruleslist'), $rules); + } + $out = html::div(array('class' => 'box'), html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) . html::div(array('class' => 'boxcontent'), $table->show() . + $rules . html::p(null, $rcmail->output->button(array( 'command' => 'plugin.password-save', - 'type' => 'input', - 'class' => 'button mainaction', - 'label' => 'save' + 'type' => 'input', + 'class' => 'button mainaction', + 'label' => 'save' ))))); $rcmail->output->add_gui_object('passform', 'password-form'); return $rcmail->output->form_tag(array( - 'id' => 'password-form', - 'name' => 'password-form', + 'id' => 'password-form', + 'name' => 'password-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.password-save', ), $out); @@ -300,4 +323,48 @@ class password extends rcube_plugin return $reason; } + + function user_create($args) + { + $this->newuser = true; + return $args; + } + + function login_after($args) + { + if ($this->newuser && $this->check_host_login_exceptions()) { + $args['_task'] = 'settings'; + $args['_action'] = 'plugin.password'; + $args['_first'] = 'true'; + } + + return $args; + } + + // Check if host and login is allowed to change the password, false = not allowed, true = not allowed + private function check_host_login_exceptions() + { + $rcmail = rcmail::get_instance(); + + // Host exceptions + $hosts = $rcmail->config->get('password_hosts'); + if (!empty($hosts) && !in_array($_SESSION['storage_host'], $hosts)) { + return false; + } + + // Login exceptions + if ($exceptions = $rcmail->config->get('password_login_exceptions')) { + $exceptions = array_map('trim', (array) $exceptions); + $exceptions = array_filter($exceptions); + $username = $_SESSION['username']; + + foreach ($exceptions as $ec) { + if ($username === $ec) { + return false; + } + } + } + + return true; + } } |