diff options
Diffstat (limited to 'plugins/password')
-rw-r--r-- | plugins/password/README | 3 | ||||
-rw-r--r-- | plugins/password/config.inc.php.dist | 3 | ||||
-rw-r--r-- | plugins/password/drivers/dbmail.php | 2 | ||||
-rw-r--r-- | plugins/password/drivers/domainfactory.php | 6 | ||||
-rw-r--r-- | plugins/password/drivers/ldap_simple.php | 4 | ||||
-rw-r--r-- | plugins/password/drivers/vpopmaild.php | 2 | ||||
-rw-r--r-- | plugins/password/helpers/chgdbmailusers.c | 3 | ||||
-rw-r--r-- | plugins/password/localization/br.inc | 3 | ||||
-rw-r--r-- | plugins/password/localization/fo_FO.inc | 32 | ||||
-rw-r--r-- | plugins/password/localization/km_KH.inc | 32 | ||||
-rw-r--r-- | plugins/password/password.js | 14 | ||||
-rw-r--r-- | plugins/password/password.php | 7 |
12 files changed, 100 insertions, 11 deletions
diff --git a/plugins/password/README b/plugins/password/README index 262ebfd86..c50eb0bf3 100644 --- a/plugins/password/README +++ b/plugins/password/README @@ -310,6 +310,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). + 3. Driver API ------------- diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index 8c83dd703..8f7a57f9a 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -256,6 +256,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 // -------------------------- diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php index 529027b8d..5cfe92cd7 100644 --- a/plugins/password/drivers/dbmail.php +++ b/plugins/password/drivers/dbmail.php @@ -17,7 +17,7 @@ class rcube_dbmail_password { - function password_save($currpass, $newpass) + function save($currpass, $newpass) { $curdir = RCUBE_PLUGINS_DIR . 'password/helpers'; $username = escapeshellcmd($_SESSION['username']); diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php index 9128720c9..62d9bfce2 100644 --- a/plugins/password/drivers/domainfactory.php +++ b/plugins/password/drivers/domainfactory.php @@ -29,11 +29,11 @@ class rcube_domainfactory_password CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => 'https://ssl.df.eu/chmail.php', CURLOPT_POST => true, - CURLOPT_POSTFIELDS => array( + CURLOPT_POSTFIELDS => http_build_query(array( 'login' => $rcmail->user->get_username(), 'pwd' => $curpass, 'action' => 'change' - ) + )) )); if ($result = curl_exec($ch)) { @@ -51,7 +51,7 @@ class rcube_domainfactory_password // change password $ch = curl_copy_handle($ch); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields)); if ($result = curl_exec($ch)) { // has the password been changed? diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index 47e3b07de..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)) { 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/helpers/chgdbmailusers.c b/plugins/password/helpers/chgdbmailusers.c index 28f79c100..22793857d 100644 --- a/plugins/password/helpers/chgdbmailusers.c +++ b/plugins/password/helpers/chgdbmailusers.c @@ -5,7 +5,6 @@ // set the UID this script will run as (root user) #define UID 0 #define CMD "/usr/sbin/dbmail-users" -#define RCOK 0x100 /* INSTALLING: gcc -o chgdbmailusers chgdbmailusers.c @@ -38,7 +37,7 @@ main(int argc, char *argv[]) cc = setuid(UID); rc = system(cmnd); - if ((rc != RCOK) || (cc != 0)) + if ((rc != 0) || (cc != 0)) { fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc); return 1; 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/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/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/password.js b/plugins/password/password.js index 1bfb2a0d3..ae494558c 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -1,6 +1,18 @@ /** * Password plugin script - * @version @package_version@ + * + * @licstart The following is the entire license notice for the + * JavaScript code in this file. + * + * Copyright (c) 2012-2014, The Roundcube Dev Team + * + * The JavaScript code in this page is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * @licend The above is the entire license notice + * for the JavaScript code in this file. */ if (window.rcmail) { diff --git a/plugins/password/password.php b/plugins/password/password.php index e31613ab1..83f951b98 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -70,9 +70,14 @@ class password extends rcube_plugin } $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')); - $this->include_script('password.js'); + + + if (strpos($rcmail->action, 'plugin.password') === 0) { + $this->include_script('password.js'); + } } function settings_actions($args) |