summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/drivers/domainfactory.php10
-rw-r--r--plugins/password/drivers/ldap.php2
-rw-r--r--plugins/password/drivers/ldap_simple.php6
-rw-r--r--plugins/password/localization/ber.inc16
-rw-r--r--plugins/password/localization/br.inc3
-rw-r--r--plugins/password/localization/ca_ES.inc8
-rw-r--r--plugins/password/localization/en_CA.inc32
-rw-r--r--plugins/password/localization/es_419.inc32
-rw-r--r--plugins/password/localization/fo_FO.inc32
-rw-r--r--plugins/password/localization/gl_ES.inc12
-rw-r--r--plugins/password/localization/km_KH.inc32
-rw-r--r--plugins/password/localization/sk_SK.inc18
-rw-r--r--plugins/password/password.js16
13 files changed, 168 insertions, 51 deletions
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php
index 3351d2fd3..62d9bfce2 100644
--- a/plugins/password/drivers/domainfactory.php
+++ b/plugins/password/drivers/domainfactory.php
@@ -54,7 +54,12 @@ class rcube_domainfactory_password
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
if ($result = curl_exec($ch)) {
- // did the new password match the requirements?
+ // has the password been changed?
+ if (strpos($result, 'Einstellungen erfolgreich') !== false) {
+ return PASSWORD_SUCCESS;
+ }
+
+ // show error message(s) if possible
if (strpos($result, '<div class="d-msg-text">') !== false) {
preg_match_all('#<div class="d-msg-text">(.*?)</div>#s', $result, $errors);
if (isset($errors[1])) {
@@ -66,9 +71,6 @@ class rcube_domainfactory_password
}
}
- if (strpos($result, 'Einstellungen erfolgreich') !== false) {
- return PASSWORD_SUCCESS;
- }
} else {
return PASSWORD_CONNECT_ERROR;
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index cf62debcf..739958ad7 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -146,7 +146,7 @@ class rcube_ldap_password
return '';
}
- $base = $rcmail->config->get('password_ldap_search_base');
+ $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base'));
$filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter'));
$options = array (
'scope' => 'sub',
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index c5d828fab..3e167ea5b 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -113,7 +113,7 @@ class rcube_ldap_simple_password
return PASSWORD_CRYPT_ERROR;
}
- $this->_debug("C: Bind $binddn [pass: $bindpw]");
+ $this->_debug("C: Bind $binddn, pass: **** [" . strlen($bindpw) . "]");
// Bind
if (!ldap_bind($ds, $binddn, $bindpw)) {
@@ -175,7 +175,7 @@ class rcube_ldap_simple_password
return null;
}
- $this->_debug("C: Bind $search_user [pass: $search_pass]");
+ $this->_debug("C: Bind $search_user, pass: **** [" . strlen($search_pass) . "]");
// Bind
if (!ldap_bind($ds, $search_user, $search_pass)) {
@@ -187,6 +187,8 @@ class rcube_ldap_simple_password
$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);
$this->_debug("C: Search $search_base for $search_filter");
diff --git a/plugins/password/localization/ber.inc b/plugins/password/localization/ber.inc
deleted file mode 100644
index 046e45733..000000000
--- a/plugins/password/localization/ber.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization//labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: FULL NAME <EMAIL@ADDRESS> |
- +-----------------------------------------------------------------------+
-*/
-
-
diff --git a/plugins/password/localization/br.inc b/plugins/password/localization/br.inc
index 423fc74df..a43b0b715 100644
--- a/plugins/password/localization/br.inc
+++ b/plugins/password/localization/br.inc
@@ -16,7 +16,7 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
$labels['changepasswd'] = 'Kemmañ ar ger-tremen';
-$labels['curpasswd'] = 'Ger-tremen red :';
+$labels['curpasswd'] = 'Ger-tremen bremañ :';
$labels['newpasswd'] = 'Ger-tremen nevez :';
$labels['confpasswd'] = 'Kadarnaat ar ger-tremen :';
$messages['nopassword'] = 'Roit ur ger-tremen nevez, mar plij.';
@@ -27,5 +27,6 @@ $messages['crypterror'] = 'N\'haller ket enrollañ ar ger-tremen nevez. Arc\'hwe
$messages['connecterror'] = 'N\'haller ket enrollañ ar ger-tremen nevez. Fazi gant ar c\'hennask.';
$messages['internalerror'] = 'N\'haller ket enrollañ ar ger-tremen nevez.';
$messages['passwordshort'] = 'Ret eo d\'ar ger-tremen bezañ hiroc\'h eget $length arouezenn.';
+$messages['passwordweak'] = 'En ho ker-tremen e tle bezañ ur sifr hag un arouezenn boentaouiñ da nebeutañ';
$messages['passwordforbidden'] = 'Arouezennoù difennet zo er ger-tremen.';
?>
diff --git a/plugins/password/localization/ca_ES.inc b/plugins/password/localization/ca_ES.inc
index 3ab4ed1ad..8e367155f 100644
--- a/plugins/password/localization/ca_ES.inc
+++ b/plugins/password/localization/ca_ES.inc
@@ -23,10 +23,10 @@ $messages['nopassword'] = 'Si us plau, introduïu la nova contrasenya.';
$messages['nocurpassword'] = 'Si us plau, introduïu la contrasenya actual.';
$messages['passwordincorrect'] = 'Contrasenya actual incorrecta.';
$messages['passwordinconsistency'] = 'La contrasenya nova no coincideix, torneu-ho a provar.';
-$messages['crypterror'] = 'No es pot desar la nova contrasenya. No existeix la funció d\'encriptació.';
-$messages['connecterror'] = 'No es pot desar la nova contrasenya. Error de connexió.';
-$messages['internalerror'] = 'No es pot desar la nova contrasenya.';
-$messages['passwordshort'] = 'La nova contrasenya ha de tenir com a mínim $length caràcters de llarg.';
+$messages['crypterror'] = 'No s\'ha pogut desar la nova contrasenya. No existeix la funció d\'encriptació.';
+$messages['connecterror'] = 'No s\'ha pogut desar la nova contrasenya. Error de connexió.';
+$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.';
?>
diff --git a/plugins/password/localization/en_CA.inc b/plugins/password/localization/en_CA.inc
new file mode 100644
index 000000000..6206b5923
--- /dev/null
+++ b/plugins/password/localization/en_CA.inc
@@ -0,0 +1,32 @@
+<?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'] = 'Change Password';
+$labels['curpasswd'] = 'Current Password:';
+$labels['newpasswd'] = 'New Password:';
+$labels['confpasswd'] = 'Confirm New Password:';
+$messages['nopassword'] = 'Please input new password.';
+$messages['nocurpassword'] = 'Please input current password.';
+$messages['passwordincorrect'] = 'Current password incorrect.';
+$messages['passwordinconsistency'] = 'Passwords do not match, please try again.';
+$messages['crypterror'] = 'Could not save new password. Encryption function missing.';
+$messages['connecterror'] = 'Could not save new password. Connection error.';
+$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.';
+?>
diff --git a/plugins/password/localization/es_419.inc b/plugins/password/localization/es_419.inc
new file mode 100644
index 000000000..3d99b561c
--- /dev/null
+++ b/plugins/password/localization/es_419.inc
@@ -0,0 +1,32 @@
+<?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'] = 'Cambiar contraseña';
+$labels['curpasswd'] = 'Contraseña actual: ';
+$labels['newpasswd'] = 'Contraseña nueva:';
+$labels['confpasswd'] = 'Confirmar contraseña nueva:';
+$messages['nopassword'] = 'Por favor, ingresa la nueva contraseña.';
+$messages['nocurpassword'] = 'Por favor, ingresa la contraseña actual.';
+$messages['passwordincorrect'] = 'Contraseña actual incorrecta.';
+$messages['passwordinconsistency'] = 'Las contraseñas no concuerdan, por favor intenta nuevamente.';
+$messages['crypterror'] = 'No se puedo guardar la nueva contraseña. No se encuentra la función de encriptación.';
+$messages['connecterror'] = 'No se puedo guardar la nueva contraseña. Error de conexión.';
+$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.';
+?>
diff --git a/plugins/password/localization/fo_FO.inc b/plugins/password/localization/fo_FO.inc
new file mode 100644
index 000000000..7c9ba55bc
--- /dev/null
+++ b/plugins/password/localization/fo_FO.inc
@@ -0,0 +1,32 @@
+<?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'] = 'Broyt loyniorð';
+$labels['curpasswd'] = 'Nú verandi loyniorð:';
+$labels['newpasswd'] = 'Nýtt loyniorð:';
+$labels['confpasswd'] = 'Endurtak nýggja loyniorð:';
+$messages['nopassword'] = 'Vinarliga skriva inn nýtt loyniorð.';
+$messages['nocurpassword'] = 'Vinarliga skriva inn núverandi loyniorð.';
+$messages['passwordincorrect'] = 'Verandi loyniorð er skeift.';
+$messages['passwordinconsistency'] = 'Loyniorðini eru ikki líka, vinarliga royn aftur.';
+$messages['crypterror'] = 'Kann ikki goyma nýggja loyniorð. Brongling manglar.';
+$messages['connecterror'] = 'Kann ikki goyma nýtt loyniorð. Sambands feilur.';
+$messages['internalerror'] = 'Kundi ikki goyma nýggja loyniorðið.';
+$messages['passwordshort'] = 'Loyniorði má hvørfall verða $length tekin langt.';
+$messages['passwordweak'] = 'Loyniorði má innihalda minst eitt nummar og eitt punktum tekin.';
+$messages['passwordforbidden'] = 'Loyniorð inniheldur ólóglig tekin.';
+?>
diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc
index f738c62a0..1415366a3 100644
--- a/plugins/password/localization/gl_ES.inc
+++ b/plugins/password/localization/gl_ES.inc
@@ -19,13 +19,13 @@ $labels['changepasswd'] = 'Cambiar contrasinal';
$labels['curpasswd'] = 'Contrasinal actual:';
$labels['newpasswd'] = 'Contrasinal novo:';
$labels['confpasswd'] = 'Confirmar contrasinal:';
-$messages['nopassword'] = 'Por favor, introduza un contrasinal novo.';
-$messages['nocurpassword'] = 'Por favor, introduza o contrasinal actual.';
+$messages['nopassword'] = 'Por favor, introduce un contrasinal novo.';
+$messages['nocurpassword'] = 'Por favor, introduce o contrasinal actual.';
$messages['passwordincorrect'] = 'O contrasinal actual é incorrecto.';
-$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténteo outra vez.';
-$messages['crypterror'] = 'Non foi posible gardar o contrasinal novo. Falta a función de cifrado.';
-$messages['connecterror'] = 'Non foi posible gardar o contrasinal novo. Erro de conexión';
-$messages['internalerror'] = 'Non foi posible gardar o contrasinal novo.';
+$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténtao outra vez.';
+$messages['crypterror'] = 'Non foi posíbel gardar o contrasinal novo. Falta a función de cifrado.';
+$messages['connecterror'] = 'Non foi posíbel gardar o contrasinal novo. Erro de conexión';
+$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.';
diff --git a/plugins/password/localization/km_KH.inc b/plugins/password/localization/km_KH.inc
new file mode 100644
index 000000000..f223dc653
--- /dev/null
+++ b/plugins/password/localization/km_KH.inc
@@ -0,0 +1,32 @@
+<?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'] = 'ពាក្យ​សម្ងាត់​មាន​អក្សរ​ដែល​ត្រូវហាម​ឃាត់។';
+?>
diff --git a/plugins/password/localization/sk_SK.inc b/plugins/password/localization/sk_SK.inc
index fd0210285..51339bb7b 100644
--- a/plugins/password/localization/sk_SK.inc
+++ b/plugins/password/localization/sk_SK.inc
@@ -16,16 +16,16 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
$labels['changepasswd'] = 'Zmeniť heslo';
-$labels['curpasswd'] = 'Súčasné heslo:';
+$labels['curpasswd'] = 'Aktuálne heslo:';
$labels['newpasswd'] = 'Nové heslo:';
-$labels['confpasswd'] = 'Potvrď nové heslo:';
-$messages['nopassword'] = 'Prosím zadaj nové heslo.';
-$messages['nocurpassword'] = 'Prosím zadaj súčasné heslo.';
-$messages['passwordincorrect'] = 'Súčasné heslo je nesprávne.';
-$messages['passwordinconsistency'] = 'Heslá nie sú rovnaké, skús znova.';
-$messages['crypterror'] = 'Nemôžem uložiť nové heslo. Chýba šifrovacia funkcia.';
-$messages['connecterror'] = 'Nemôžem uložiť nové heslo. Chyba spojenia.';
-$messages['internalerror'] = 'Nemôžem uložiť nové heslo.';
+$labels['confpasswd'] = 'Potvrďte nové heslo:';
+$messages['nopassword'] = 'Prosím zadajte nové heslo.';
+$messages['nocurpassword'] = 'Prosím zadajte aktuálne heslo.';
+$messages['passwordincorrect'] = 'Aktuálne heslo je nesprávne.';
+$messages['passwordinconsistency'] = 'Heslá nie sú rovnaké, skúste to znova.';
+$messages['crypterror'] = 'Nové heslo nemožno uložiť. Chýba šifrovacia funkcia.';
+$messages['connecterror'] = 'Nové heslo nemožno uložiť. Chyba spojenia.';
+$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.';
diff --git a/plugins/password/password.js b/plugins/password/password.js
index 12c9074ff..1bfb2a0d3 100644
--- a/plugins/password/password.js
+++ b/plugins/password/password.js
@@ -1,4 +1,4 @@
-/*
+/**
* Password plugin script
* @version @package_version@
*/
@@ -8,17 +8,17 @@ if (window.rcmail) {
// register command handler
rcmail.register_command('plugin.password-save', function() {
- var input_curpasswd = rcube_find_object('_curpasswd');
- var input_newpasswd = rcube_find_object('_newpasswd');
- var input_confpasswd = rcube_find_object('_confpasswd');
-
- if (input_curpasswd && input_curpasswd.value=='') {
+ 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) {