summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/README116
-rw-r--r--plugins/password/config.inc.php.dist142
-rw-r--r--plugins/password/drivers/chpasswd.php2
-rw-r--r--plugins/password/drivers/cpanel.php110
-rw-r--r--plugins/password/drivers/dbmail.php2
-rw-r--r--plugins/password/drivers/directadmin.php3
-rw-r--r--plugins/password/drivers/domainfactory.php117
-rw-r--r--plugins/password/drivers/expect.php2
-rw-r--r--plugins/password/drivers/hmail.php12
-rw-r--r--plugins/password/drivers/ldap.php169
-rw-r--r--plugins/password/drivers/ldap_simple.php228
-rw-r--r--plugins/password/drivers/pam.php4
-rw-r--r--plugins/password/drivers/pw_usermod.php2
-rw-r--r--plugins/password/drivers/sasl.php2
-rw-r--r--plugins/password/drivers/smb.php14
-rw-r--r--plugins/password/drivers/sql.php19
-rw-r--r--plugins/password/drivers/virtualmin.php2
-rw-r--r--plugins/password/drivers/xmail.php16
-rw-r--r--plugins/password/localization/az_AZ.inc5
-rw-r--r--plugins/password/localization/ber.inc1
-rw-r--r--plugins/password/localization/bg_BG.inc21
-rw-r--r--plugins/password/localization/br.inc6
-rw-r--r--plugins/password/localization/bs_BA.inc5
-rw-r--r--plugins/password/localization/ca_ES.inc5
-rw-r--r--plugins/password/localization/cs_CZ.inc5
-rw-r--r--plugins/password/localization/cy_GB.inc5
-rw-r--r--plugins/password/localization/da_DK.inc5
-rw-r--r--plugins/password/localization/de_CH.inc5
-rw-r--r--plugins/password/localization/de_DE.inc5
-rw-r--r--plugins/password/localization/en_GB.inc5
-rw-r--r--plugins/password/localization/en_US.inc2
-rw-r--r--plugins/password/localization/eo.inc5
-rw-r--r--plugins/password/localization/es_AR.inc5
-rw-r--r--plugins/password/localization/es_ES.inc5
-rw-r--r--plugins/password/localization/et_EE.inc5
-rw-r--r--plugins/password/localization/fa_IR.inc5
-rw-r--r--plugins/password/localization/fi_FI.inc5
-rw-r--r--plugins/password/localization/fr_FR.inc5
-rw-r--r--plugins/password/localization/gl_ES.inc7
-rw-r--r--plugins/password/localization/he_IL.inc5
-rw-r--r--plugins/password/localization/hr_HR.inc5
-rw-r--r--plugins/password/localization/hu_HU.inc5
-rw-r--r--plugins/password/localization/hy_AM.inc5
-rw-r--r--plugins/password/localization/id_ID.inc5
-rw-r--r--plugins/password/localization/it_IT.inc5
-rw-r--r--plugins/password/localization/ja_JP.inc5
-rw-r--r--plugins/password/localization/ko_KR.inc5
-rw-r--r--plugins/password/localization/ku.inc18
-rw-r--r--plugins/password/localization/lt_LT.inc5
-rw-r--r--plugins/password/localization/lv_LV.inc21
-rw-r--r--plugins/password/localization/nb_NO.inc5
-rw-r--r--plugins/password/localization/nl_NL.inc5
-rw-r--r--plugins/password/localization/nn_NO.inc5
-rw-r--r--plugins/password/localization/pl_PL.inc5
-rw-r--r--plugins/password/localization/pt_BR.inc5
-rw-r--r--plugins/password/localization/pt_PT.inc5
-rw-r--r--plugins/password/localization/ro_RO.inc5
-rw-r--r--plugins/password/localization/ru_RU.inc9
-rw-r--r--plugins/password/localization/sk_SK.inc5
-rw-r--r--plugins/password/localization/sl_SI.inc5
-rw-r--r--plugins/password/localization/sr_CS.inc5
-rw-r--r--plugins/password/localization/sv_SE.inc5
-rw-r--r--plugins/password/localization/tr_TR.inc5
-rw-r--r--plugins/password/localization/vi_VN.inc5
-rw-r--r--plugins/password/localization/zh_CN.inc5
-rw-r--r--plugins/password/localization/zh_TW.inc5
-rw-r--r--plugins/password/package.xml40
-rw-r--r--plugins/password/password.js7
-rw-r--r--plugins/password/password.php92
69 files changed, 846 insertions, 540 deletions
diff --git a/plugins/password/README b/plugins/password/README
index 262ebfd86..ef6f5b428 100644
--- a/plugins/password/README
+++ b/plugins/password/README
@@ -1,29 +1,31 @@
-----------------------------------------------------------------------
Password Plugin for Roundcube
-----------------------------------------------------------------------
+
Plugin that adds a possibility to change user password using many
methods (drivers) via Settings/Password tab.
+
-----------------------------------------------------------------------
- This program 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.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@version @package_version@
- @author Aleksander Machniak <alec@alec.pl>
+ @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
@author <see driver files for driver authors>
-----------------------------------------------------------------------
- 1. Configuration
- 2. Drivers
+ 1. Configuration
+ 2. Drivers
2.1. Database (sql)
2.2. Cyrus/SASL (sasl)
2.3. Poppassd/Courierpassd (poppassd)
@@ -42,8 +44,7 @@
2.16. DBMail (dbmail)
2.17. Expect (expect)
2.18. Samba (smb)
- 2.19. Vpopmail daemon (vpopmaild)
- 3. Driver API
+ 3. Driver API
1. Configuration
@@ -64,40 +65,40 @@
-------------------
You can specify which database to connect by 'password_db_dsn' option and
- what SQL query to execute by 'password_query'. See config.inc.php.dist file for
+ what SQL query to execute by 'password_query'. See main.inc.php.dist file for
more info.
Example implementations of an update_passwd function:
- This is for use with LMS (http://lms.org.pl) database and postgres:
- CREATE OR REPLACE FUNCTION update_passwd(hash text, account text) RETURNS integer AS $$
- DECLARE
- res integer;
- BEGIN
- UPDATE passwd SET password = hash
- WHERE login = split_part(account, '@', 1)
- AND domainid = (SELECT id FROM domains WHERE name = split_part(account, '@', 2))
- RETURNING id INTO res;
- RETURN res;
- END;
- $$ LANGUAGE plpgsql SECURITY DEFINER;
+ CREATE OR REPLACE FUNCTION update_passwd(hash text, account text) RETURNS integer AS $$
+ DECLARE
+ res integer;
+ BEGIN
+ UPDATE passwd SET password = hash
+ WHERE login = split_part(account, '@', 1)
+ AND domainid = (SELECT id FROM domains WHERE name = split_part(account, '@', 2))
+ RETURNING id INTO res;
+ RETURN res;
+ END;
+ $$ LANGUAGE plpgsql SECURITY DEFINER;
- This is for use with a SELECT update_passwd(%o,%c,%u) query
- Updates the password only when the old password matches the MD5 password
- in the database
-
- CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
- MODIFIES SQL DATA
- BEGIN
- DECLARE currentsalt varchar(20);
- DECLARE error text;
- SET error = 'incorrect current password';
- SELECT substring_index(substr(user.password,4),_latin1'$',1) INTO currentsalt FROM users WHERE username=user;
- SELECT '' INTO error FROM users WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
- UPDATE users SET password=cryptpass WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
- RETURN error;
- END
+ Updates the password only when the old password matches the MD5 password
+ in the database
+
+ CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
+ MODIFIES SQL DATA
+ BEGIN
+ DECLARE currentsalt varchar(20);
+ DECLARE error text;
+ SET error = 'incorrect current password';
+ SELECT substring_index(substr(user.password,4),_latin1'$',1) INTO currentsalt FROM users WHERE username=user;
+ SELECT '' INTO error FROM users WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
+ UPDATE users SET password=cryptpass WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
+ RETURN error;
+ END
Example SQL UPDATEs:
@@ -137,11 +138,12 @@
Installation:
- Change into the helpers directory. Edit the chgsaslpasswd.c file as is
+ Change into the helpers directory. Copy and edit
+ /usr/share/roundcube-plugins/examples/chgsaslpasswd.c as is
documented within it.
Compile the wrapper program:
- gcc -o chgsaslpasswd chgsaslpasswd.c
+ gcc -o chgsaslpasswd chgsaslpasswd.c
Chown the compiled chgsaslpasswd binary to the cyrus user and group
that your browser runs as, then chmod them to 4550.
@@ -149,13 +151,13 @@
For example, if your cyrus user is 'cyrus' and the apache server group is
'nobody' (I've been told Redhat runs Apache as user 'apache'):
- chown cyrus:nobody chgsaslpasswd
- chmod 4550 chgsaslpasswd
+ chown cyrus:nobody chgsaslpasswd
+ chmod 4550 chgsaslpasswd
Stephen Carr has suggested users should try to run the scripts on a test
account as the cyrus user eg;
- su cyrus -c "./chgsaslpasswd -p test_account"
+ su cyrus -c "./chgsaslpasswd -p test_account"
This will allow you to make sure that the script will work for your setup.
Should the script not work, make sure that:
@@ -191,12 +193,8 @@
2.6. cPanel (cpanel)
--------------------
- Install cPanel XMLAPI Client Class into Roundcube program/lib directory
- or any other place in PHP include path. You can get the class from
- https://raw.github.com/CpanelInc/xmlapi-php/master/xmlapi.php
-
- You can configure parameters for connection to cPanel's API interface.
- See config.inc.php.dist file for more info.
+ You can specify parameters for HTTP connection to cPanel's admin
+ interface. See config.inc.php.dist file for more info.
2.7. XIMSS/Communigate (ximms)
@@ -210,7 +208,8 @@
----------------------------
As in sasl driver this one allows to change password using shell
- utility called "virtualmin". See helpers/chgvirtualminpasswd.c for
+ utility called "virtualmin". See
+ /usr/share/doc/roundcube-plugins/examples/chgvirtualminpasswd.c for
installation instructions. See also config.inc.php.dist file.
@@ -235,8 +234,9 @@
Driver that adds functionality to change the systems user password via
the 'chpasswd' command. See config.inc.php.dist file.
- Attached wrapper script (helpers/chpass-wrapper.py) restricts password changes
- to uids >= 1000 and can deny requests based on a blacklist.
+ Attached wrapper script
+ (/usr/share/doc/roundcube-plugins/examples/chpass-wrapper.py) restricts
+ password changes to uids >= 1000 and can deny requests based on a blacklist.
2.12. LDAP - no PEAR (ldap_simple)
@@ -247,7 +247,7 @@
This driver is fully compatible with the ldap driver, but
does not require (or uses) the
- $config['password_ldap_force_replace'] variable.
+ $rcmail_config['password_ldap_force_replace'] variable.
Other advantages:
* Connects only once with the LDAP server when using the search user.
* Does not read the DN, but only replaces the password within (that is
@@ -300,16 +300,6 @@
Driver to change Samba user password via the 'smbpasswd' command.
See config.inc.php.dist file for configuration description.
- 2.19. Vpopmail daemon (vpopmaild)
- -----------------------------------
-
- Driver for the daemon of vpopmail. Vpopmail is used with qmail to
- enable virtual users that are saved in a database and not in /etc/passwd.
-
- Set $config['password_vpopmaild_host'] to the host where vpopmaild runs.
-
- Set $config['password_vpopmaild_port'] to the port of vpopmaild.
-
3. Driver API
-------------
diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist
index 8c83dd703..a40e2a93f 100644
--- a/plugins/password/config.inc.php.dist
+++ b/plugins/password/config.inc.php.dist
@@ -4,43 +4,39 @@
// -----------------------
// A driver to use for password change. Default: "sql".
// See README file for list of supported driver names.
-$config['password_driver'] = 'sql';
+$rcmail_config['password_driver'] = 'sql';
// Determine whether current password is required to change password.
// Default: false.
-$config['password_confirm_current'] = true;
+$rcmail_config['password_confirm_current'] = true;
// Require the new password to be a certain length.
// set to blank to allow passwords of any length
-$config['password_minimum_length'] = 0;
+$rcmail_config['password_minimum_length'] = 0;
// Require the new password to contain a letter and punctuation character
// Change to false to remove this check.
-$config['password_require_nonalpha'] = false;
+$rcmail_config['password_require_nonalpha'] = false;
// Enables logging of password changes into logs/password
-$config['password_log'] = false;
+$rcmail_config['password_log'] = false;
// Comma-separated list of login exceptions for which password change
// will be not available (no Password tab in Settings)
-$config['password_login_exceptions'] = null;
+$rcmail_config['password_login_exceptions'] = null;
// Array of hosts that support password changing. Default is NULL.
// Listed hosts will feature a Password option in Settings; others will not.
// Example:
-//$config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
-$config['password_hosts'] = null;
-
-// Enables saving the new password even if it matches the old password. Useful
-// for upgrading the stored passwords after the encryption scheme has changed.
-$config['password_force_save'] = false;
+//$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
+$rcmail_config['password_hosts'] = null;
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
-$config['password_db_dsn'] = '';
+$rcmail_config['password_db_dsn'] = '';
// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
@@ -60,52 +56,52 @@ $config['password_db_dsn'] = '';
// (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
-$config['password_query'] = 'SELECT update_passwd(%c, %u)';
+$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
// By default the crypt() function which is used to create the '%c'
// parameter uses the md5 algorithm. To use different algorithms
// you can choose between: des, md5, blowfish, sha256, sha512.
// Before using other hash functions than des or md5 please make sure
// your operating system supports the other hash functions.
-$config['password_crypt_hash'] = 'md5';
+$rcmail_config['password_crypt_hash'] = 'md5';
// By default domains in variables are using unicode.
// Enable this option to use punycoded names
-$config['password_idn_ascii'] = false;
+$rcmail_config['password_idn_ascii'] = false;
// Path for dovecotpw (if not in $PATH)
-// $config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
+// $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
// Dovecot method (dovecotpw -s 'method')
-$config['password_dovecotpw_method'] = 'CRAM-MD5';
+$rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';
// Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
-$config['password_dovecotpw_with_method'] = false;
+$rcmail_config['password_dovecotpw_with_method'] = false;
// Using a password hash for %n and %q variables.
// Determine which hashing algorithm should be used to generate
// the hashed new and current password for using them within the
// SQL query. Requires PHP's 'hash' extension.
-$config['password_hash_algorithm'] = 'sha1';
+$rcmail_config['password_hash_algorithm'] = 'sha1';
// You can also decide whether the hash should be provided
// as hex string or in base64 encoded format.
-$config['password_hash_base64'] = false;
+$rcmail_config['password_hash_base64'] = false;
// Poppassd Driver options
// -----------------------
// The host which changes the password
-$config['password_pop_host'] = 'localhost';
+$rcmail_config['password_pop_host'] = 'localhost';
// TCP port used for poppassd connections
-$config['password_pop_port'] = 106;
+$rcmail_config['password_pop_port'] = 106;
// SASL Driver options
// -------------------
// Additional arguments for the saslpasswd2 call
-$config['password_saslpasswd_args'] = '';
+$rcmail_config['password_saslpasswd_args'] = '';
// LDAP and LDAP_SIMPLE Driver options
@@ -114,41 +110,41 @@ $config['password_saslpasswd_args'] = '';
// You can provide one or several hosts in an array in which case the hosts are tried from left to right.
// Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
// Default: 'localhost'
-$config['password_ldap_host'] = 'localhost';
+$rcmail_config['password_ldap_host'] = 'localhost';
// LDAP server port to connect to
// Default: '389'
-$config['password_ldap_port'] = '389';
+$rcmail_config['password_ldap_port'] = '389';
// TLS is started after connecting
// Using TLS for password modification is recommanded.
// Default: false
-$config['password_ldap_starttls'] = false;
+$rcmail_config['password_ldap_starttls'] = false;
// LDAP version
// Default: '3'
-$config['password_ldap_version'] = '3';
+$rcmail_config['password_ldap_version'] = '3';
// LDAP base name (root directory)
// Exemple: 'dc=exemple,dc=com'
-$config['password_ldap_basedn'] = 'dc=exemple,dc=com';
+$rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com';
// LDAP connection method
// There is two connection method for changing a user's LDAP password.
// 'user': use user credential (recommanded, require password_confirm_current=true)
// 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
// Default: 'user'
-$config['password_ldap_method'] = 'user';
+$rcmail_config['password_ldap_method'] = 'user';
// LDAP Admin DN
// Used only in admin connection mode
// Default: null
-$config['password_ldap_adminDN'] = null;
+$rcmail_config['password_ldap_adminDN'] = null;
// LDAP Admin Password
// Used only in admin connection mode
// Default: null
-$config['password_ldap_adminPW'] = null;
+$rcmail_config['password_ldap_adminPW'] = null;
// LDAP user DN mask
// The user's DN is mandatory and as we only have his login,
@@ -158,7 +154,7 @@ $config['password_ldap_adminPW'] = null;
// '%domain' will be replaced by the current roundcube user's domain part
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
-$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
+$rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
// LDAP search DN
// The DN roundcube should bind with to find out user's DN
@@ -169,7 +165,7 @@ $config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
// users login to find his DN instead. A common reason might be that
// your users are placed under different ou's like engineering or
// sales which cannot be derived from their login only.
-$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
+$rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
// LDAP search password
// If password_ldap_searchDN is set, the password to use for
@@ -179,13 +175,13 @@ $config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com'
// is only accesible to roundcube and don't forget to restrict roundcube's access to
// your directory as much as possible using ACLs. Should this password be compromised
// you want to minimize the damage.
-$config['password_ldap_searchPW'] = 'secret';
+$rcmail_config['password_ldap_searchPW'] = 'secret';
// LDAP search base
// If password_ldap_searchDN is set, the base to search in using the filter below.
// Note that you should comment out the default password_ldap_userDN_mask setting
// for this to take effect.
-$config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
+$rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
// LDAP search filter
// If password_ldap_searchDN is set, the filter to use when
@@ -197,42 +193,42 @@ $config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Example: '(uid=%login)'
// Example: '(&(objectClass=posixAccount)(uid=%login))'
-$config['password_ldap_search_filter'] = '(uid=%login)';
+$rcmail_config['password_ldap_search_filter'] = '(uid=%login)';
// LDAP password hash type
// Standard LDAP encryption type which must be one of: crypt,
-// ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, ad or clear.
+// ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
// Please note that most encodage types require external libraries
// to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info.
// Default: 'crypt'
-$config['password_ldap_encodage'] = 'crypt';
+$rcmail_config['password_ldap_encodage'] = 'crypt';
// LDAP password attribute
// Name of the ldap's attribute used for storing user password
// Default: 'userPassword'
-$config['password_ldap_pwattr'] = 'userPassword';
+$rcmail_config['password_ldap_pwattr'] = 'userPassword';
// LDAP password force replace
// Force LDAP replace in cases where ACL allows only replace not read
// See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
// Default: true
-$config['password_ldap_force_replace'] = true;
+$rcmail_config['password_ldap_force_replace'] = true;
// LDAP Password Last Change Date
// Some places use an attribute to store the date of the last password change
// The date is meassured in "days since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
-$config['password_ldap_lchattr'] = '';
+$rcmail_config['password_ldap_lchattr'] = '';
// LDAP Samba password attribute, e.g. sambaNTPassword
// Name of the LDAP's Samba attribute used for storing user password
-$config['password_ldap_samba_pwattr'] = '';
+$rcmail_config['password_ldap_samba_pwattr'] = '';
// LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
// Some places use an attribute to store the date of the last password change
// The date is meassured in "seconds since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set
-$config['password_ldap_samba_lchattr'] = '';
+$rcmail_config['password_ldap_samba_lchattr'] = '';
// DirectAdmin Driver options
@@ -242,57 +238,63 @@ $config['password_ldap_samba_lchattr'] = '';
// The host can contain the following macros that will be expanded as follows:
// %h is replaced with the imap host (from the session info)
// %d is replaced with the domain part of the username (if the username is an email)
-$config['password_directadmin_host'] = 'tcp://localhost';
+$rcmail_config['password_directadmin_host'] = 'tcp://localhost';
// TCP port used for DirectAdmin connections
-$config['password_directadmin_port'] = 2222;
+$rcmail_config['password_directadmin_port'] = 2222;
// vpopmaild Driver options
// -----------------------
// The host which changes the password
-$config['password_vpopmaild_host'] = 'localhost';
+$rcmail_config['password_vpopmaild_host'] = 'localhost';
// TCP port used for vpopmaild connections
-$config['password_vpopmaild_port'] = 89;
+$rcmail_config['password_vpopmaild_port'] = 89;
// cPanel Driver options
// --------------------------
// The cPanel Host name
-$config['password_cpanel_host'] = 'host.domain.com';
+$rcmail_config['password_cpanel_host'] = 'host.domain.com';
// The cPanel admin username
-$config['password_cpanel_username'] = 'username';
+$rcmail_config['password_cpanel_username'] = 'username';
// The cPanel admin password
-$config['password_cpanel_password'] = 'password';
+$rcmail_config['password_cpanel_password'] = 'password';
// The cPanel port to use
-$config['password_cpanel_port'] = 2087;
+$rcmail_config['password_cpanel_port'] = 2082;
+
+// Using ssl for cPanel connections?
+$rcmail_config['password_cpanel_ssl'] = true;
+
+// The cPanel theme in use
+$rcmail_config['password_cpanel_theme'] = 'x';
// XIMSS (Communigate server) Driver options
// -----------------------------------------
// Host name of the Communigate server
-$config['password_ximss_host'] = 'mail.example.com';
+$rcmail_config['password_ximss_host'] = 'mail.example.com';
// XIMSS port on Communigate server
-$config['password_ximss_port'] = 11024;
+$rcmail_config['password_ximss_port'] = 11024;
// chpasswd Driver options
// ---------------------
// Command to use
-$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
+$rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
// XMail Driver options
// ---------------------
-$config['xmail_host'] = 'localhost';
-$config['xmail_user'] = 'YourXmailControlUser';
-$config['xmail_pass'] = 'YourXmailControlPass';
-$config['xmail_port'] = 6017;
+$rcmail_config['xmail_host'] = 'localhost';
+$rcmail_config['xmail_user'] = 'YourXmailControlUser';
+$rcmail_config['xmail_pass'] = 'YourXmailControlPass';
+$rcmail_config['xmail_port'] = 6017;
// hMail Driver options
@@ -300,9 +302,9 @@ $config['xmail_port'] = 6017;
// Remote hMailServer configuration
// true: HMailserver is on a remote box (php.ini: com.allow_dcom = true)
// false: Hmailserver is on same box as PHP
-$config['hmailserver_remote_dcom'] = false;
+$rcmail_config['hmailserver_remote_dcom'] = false;
// Windows credentials
-$config['hmailserver_server'] = array(
+$rcmail_config['hmailserver_server'] = array(
'Server' => 'localhost', // hostname or ip address
'Username' => 'administrator', // windows username
'Password' => 'password' // windows user password
@@ -328,36 +330,32 @@ $config['password_virtualmin_format'] = 0;
// Use comma delimited exlist to disable password change for users
// Add the following line to visudo to tighten security:
// www ALL=NOPASSWORD: /usr/sbin/pw
-$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
+$rcmail_config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
// DBMail Driver options
// -------------------
// Additional arguments for the dbmail-users call
-$config['password_dbmail_args'] = '-p sha512';
+$rcmail_config['password_dbmail_args'] = '-p sha512';
// Expect Driver options
// ---------------------
// Location of expect binary
-$config['password_expect_bin'] = '/usr/bin/expect';
+$rcmail_config['password_expect_bin'] = '/usr/bin/expect';
// Location of expect script (see helpers/passwd-expect)
-$config['password_expect_script'] = '';
+$rcmail_config['password_expect_script'] = '';
// Arguments for the expect script. See the helpers/passwd-expect file for details.
// This is probably a good starting default:
// -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log
-$config['password_expect_params'] = '';
+$rcmail_config['password_expect_params'] = '';
// smb Driver options
// ---------------------
// Samba host (default: localhost)
-// Supported replacement variables:
-// %n - hostname ($_SERVER['SERVER_NAME'])
-// %t - hostname without the first part
-// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
-$config['password_smb_host'] = 'localhost';
+$rcmail_config['password_smb_host'] = 'localhost';
// Location of smbpasswd binary
-$config['password_smb_cmd'] = '/usr/bin/smbpasswd';
+$rcmail_config['password_smb_cmd'] = '/usr/bin/smbpasswd';
diff --git a/plugins/password/drivers/chpasswd.php b/plugins/password/drivers/chpasswd.php
index 137275e69..3ea10159c 100644
--- a/plugins/password/drivers/chpasswd.php
+++ b/plugins/password/drivers/chpasswd.php
@@ -26,7 +26,7 @@ class rcube_chpasswd_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/cpanel.php b/plugins/password/drivers/cpanel.php
index b71c33ec1..79887109b 100644
--- a/plugins/password/drivers/cpanel.php
+++ b/plugins/password/drivers/cpanel.php
@@ -4,43 +4,95 @@
* cPanel Password Driver
*
* Driver that adds functionality to change the users cPanel password.
- * Originally written by Fulvio Venturelli <fulvio@venturelli.org>
+ * The cPanel PHP API code has been taken from: http://www.phpclasses.org/browse/package/3534.html
*
- * Completely rewritten using the cPanel API2 call Email::passwdpop
- * as opposed to the original coding against the UI, which is a fragile method that
- * makes the driver to always return a failure message for any language other than English
- * see http://trac.roundcube.net/ticket/1487015
+ * This driver has been tested with Hostmonster hosting and seems to work fine.
*
- * This driver has been tested with o2switch hosting and seems to work fine.
- *
- * @version 3.0
- * @author Christian Chech <christian@chech.fr>
+ * @version 2.0
+ * @author Fulvio Venturelli <fulvio@venturelli.org>
*/
class rcube_cpanel_password
{
public function save($curpas, $newpass)
{
- require_once 'xmlapi.php';
-
$rcmail = rcmail::get_instance();
- $this->cuser = $rcmail->config->get('password_cpanel_username');
-
- // Setup the xmlapi connection
- $this->xmlapi = new xmlapi($rcmail->config->get('password_cpanel_host'));
- $this->xmlapi->set_port($rcmail->config->get('password_cpanel_port'));
- $this->xmlapi->password_auth($this->cuser, $rcmail->config->get('password_cpanel_password'));
- $this->xmlapi->set_output('json');
- $this->xmlapi->set_debug(0);
+ // Create a cPanel email object
+ $cPanel = new emailAccount($rcmail->config->get('password_cpanel_host'),
+ $rcmail->config->get('password_cpanel_username'),
+ $rcmail->config->get('password_cpanel_password'),
+ $rcmail->config->get('password_cpanel_port'),
+ $rcmail->config->get('password_cpanel_ssl'),
+ $rcmail->config->get('password_cpanel_theme'),
+ $_SESSION['username'] );
- if ($this->setPassword($_SESSION['username'], $newpass)) {
+ if ($cPanel->setPassword($newpass)) {
return PASSWORD_SUCCESS;
}
else {
return PASSWORD_ERROR;
}
}
+}
+
+
+class HTTP
+{
+ function HTTP($host, $username, $password, $port, $ssl, $theme)
+ {
+ $this->ssl = $ssl ? 'ssl://' : '';
+ $this->username = $username;
+ $this->password = $password;
+ $this->theme = $theme;
+ $this->auth = base64_encode($username . ':' . $password);
+ $this->port = $port;
+ $this->host = $host;
+ $this->path = '/frontend/' . $theme . '/';
+ }
+
+ function getData($url, $data = '')
+ {
+ $url = $this->path . $url;
+ if (is_array($data)) {
+ $url = $url . '?';
+ foreach ($data as $key => $value) {
+ $url .= urlencode($key) . '=' . urlencode($value) . '&';
+ }
+ $url = substr($url, 0, -1);
+ }
+
+ $response = '';
+ $fp = fsockopen($this->ssl . $this->host, $this->port);
+ if (!$fp) {
+ return false;
+ }
+
+ $out = 'GET ' . $url . ' HTTP/1.0' . "\r\n";
+ $out .= 'Authorization: Basic ' . $this->auth . "\r\n";
+ $out .= 'Connection: Close' . "\r\n\r\n";
+ fwrite($fp, $out);
+ while (!feof($fp)) {
+ $response .= @fgets($fp);
+ }
+ fclose($fp);
+ return $response;
+ }
+}
+
+
+class emailAccount
+{
+ function emailAccount($host, $username, $password, $port, $ssl, $theme, $address)
+ {
+ $this->HTTP = new HTTP($host, $username, $password, $port, $ssl, $theme);
+ if (strpos($address, '@')) {
+ list($this->email, $this->domain) = explode('@', $address);
+ }
+ else {
+ list($this->email, $this->domain) = array($address, '');
+ }
+ }
/**
* Change email account password
@@ -49,24 +101,16 @@ class rcube_cpanel_password
* @param string $password email account password
* @return bool
*/
- function setPassword($address, $password)
+ function setPassword($password)
{
- if (strpos($address, '@')) {
- list($data['email'], $data['domain']) = explode('@', $address);
- }
- else {
- list($data['email'], $data['domain']) = array($address, '');
- }
-
+ $data['email'] = $this->email;
+ $data['domain'] = $this->domain;
$data['password'] = $password;
+ $response = $this->HTTP->getData('mail/dopasswdpop.html', $data);
- $query = $this->xmlapi->api2_query($this->cuser, 'Email', 'passwdpop', $data);
- $query = json_decode($query, true);
-
- if ($query['cpanelresult']['data'][0]['result'] == 1) {
+ if (strpos($response, 'success') && !strpos($response, 'failure')) {
return true;
}
-
return false;
}
}
diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php
index 529027b8d..e4c0d52e3 100644
--- a/plugins/password/drivers/dbmail.php
+++ b/plugins/password/drivers/dbmail.php
@@ -29,7 +29,7 @@ class rcube_dbmail_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php
index 44ecea406..fb156cea9 100644
--- a/plugins/password/drivers/directadmin.php
+++ b/plugins/password/drivers/directadmin.php
@@ -43,7 +43,7 @@ class rcube_directadmin_password
$response = $Socket->fetch_parsed_body();
//DEBUG
- //rcube::console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
+ //console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
if($Socket->result_status_code != 200)
return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]);
@@ -297,6 +297,7 @@ class HTTPSocket {
$status = socket_get_status($socket);
$startTime = time();
$length = 0;
+ $prevSecond = 0;
while ( !feof($socket) && !$status['timed_out'] )
{
$chunk = fgets($socket,1024);
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php
index 9128720c9..7f6b8860e 100644
--- a/plugins/password/drivers/domainfactory.php
+++ b/plugins/password/drivers/domainfactory.php
@@ -4,9 +4,9 @@
* domainFACTORY Password Driver
*
* Driver to change passwords with the hosting provider domainFACTORY.
- * http://www.df.eu/
+ * See: http://www.df.eu/
*
- * @version 2.1
+ * @version 2.0
* @author Till Krüss <me@tillkruess.com>
* @link http://tillkruess.com/projects/roundcube/
*
@@ -14,76 +14,57 @@
class rcube_domainfactory_password
{
- function save($curpass, $passwd)
- {
- $rcmail = rcmail::get_instance();
+ function save($curpass, $passwd)
+ {
+ $rcmail = rcmail::get_instance();
- if (is_null($curpass)) {
- $curpass = $rcmail->decrypt($_SESSION['password']);
- }
+ if (is_null($curpass)) {
+ $curpass = $rcmail->decrypt($_SESSION['password']);
+ }
- if ($ch = curl_init()) {
+ if ($ch = curl_init()) {
+ // initial login
+ curl_setopt_array($ch, array(
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_URL => 'https://ssl.df.eu/chmail.php',
+ CURLOPT_POST => true,
+ CURLOPT_POSTFIELDS => array(
+ 'login' => $rcmail->user->get_username(),
+ 'pwd' => $curpass,
+ 'action' => 'change'
+ )
+ ));
- // initial login
- curl_setopt_array($ch, array(
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_URL => 'https://ssl.df.eu/chmail.php',
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => array(
- 'login' => $rcmail->user->get_username(),
- 'pwd' => $curpass,
- 'action' => 'change'
- )
- ));
+ if ($result = curl_exec($ch)) {
+ // login successful, get token!
+ $postfields = array(
+ 'pwd1' => $passwd,
+ 'pwd2' => $passwd,
+ 'action[update]' => 'Speichern'
+ );
- if ($result = curl_exec($ch)) {
- // login successful, get token!
- $postfields = array(
- 'pwd1' => $passwd,
- 'pwd2' => $passwd,
- 'action[update]' => 'Speichern'
- );
+ preg_match_all('~<input name="(.+?)" type="hidden" value="(.+?)">~i', $result, $fields);
+ foreach ($fields[1] as $field_key => $field_name) {
+ $postfields[$field_name] = $fields[2][$field_key];
+ }
- preg_match_all('~<input name="(.+?)" type="hidden" value="(.+?)">~i', $result, $fields);
- foreach ($fields[1] as $field_key => $field_name) {
- $postfields[$field_name] = $fields[2][$field_key];
- }
+ // change password
+ $ch = curl_copy_handle($ch);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
+ if ($result = curl_exec($ch)) {
+ if (strpos($result, 'Einstellungen erfolgreich') !== false) {
+ return PASSWORD_SUCCESS;
+ }
+ } else {
+ return PASSWORD_CONNECT_ERROR;
+ }
+ } else {
+ return PASSWORD_CONNECT_ERROR;
+ }
+ } else {
+ return PASSWORD_CONNECT_ERROR;
+ }
- // change password
- $ch = curl_copy_handle($ch);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
- if ($result = curl_exec($ch)) {
-
- // 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])) {
- $error_message = '';
- foreach ( $errors[1] as $error ) {
- $error_message .= trim(mb_convert_encoding( $error, 'UTF-8', 'ISO-8859-15' )).' ';
- }
- return array('code' => PASSWORD_ERROR, 'message' => $error_message);
- }
- }
-
-
- } else {
- return PASSWORD_CONNECT_ERROR;
- }
-
- } else {
- return PASSWORD_CONNECT_ERROR;
- }
-
- } else {
- return PASSWORD_CONNECT_ERROR;
- }
-
- return PASSWORD_ERROR;
- }
+ return PASSWORD_ERROR;
+ }
}
diff --git a/plugins/password/drivers/expect.php b/plugins/password/drivers/expect.php
index 1f68924df..7a191e254 100644
--- a/plugins/password/drivers/expect.php
+++ b/plugins/password/drivers/expect.php
@@ -45,7 +45,7 @@ class rcube_expect_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php
index 650434617..104c851ae 100644
--- a/plugins/password/drivers/hmail.php
+++ b/plugins/password/drivers/hmail.php
@@ -5,6 +5,7 @@
*
* @version 2.0
* @author Roland 'rosali' Liebl <myroundcube@mail4us.net>
+ *
*/
class rcube_hmail_password
@@ -25,8 +26,8 @@ class rcube_hmail_password
$obApp = new COM("hMailServer.Application");
}
catch (Exception $e) {
- rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
@@ -38,7 +39,8 @@ class rcube_hmail_password
else {
$domain = $rcmail->config->get('username_domain',false);
if (!$domain) {
- rcube::write_log('errors','Plugin password (hmail driver): $config[\'username_domain\'] is not defined.');
+ write_log('errors','Plugin password (hmail driver): $rcmail_config[\'username_domain\'] is not defined.');
+ write_log('errors','Plugin password (hmail driver): Hint: Use hmail_login plugin (http://myroundcube.googlecode.com');
return PASSWORD_ERROR;
}
$username = $username . "@" . $domain;
@@ -53,8 +55,8 @@ class rcube_hmail_password
return PASSWORD_SUCCESS;
}
catch (Exception $e) {
- rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
}
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index 739958ad7..f773335ac 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -23,7 +23,7 @@ class rcube_ldap_password
// Building user DN
if ($userDN = $rcmail->config->get('password_ldap_userDN_mask')) {
- $userDN = self::substitute_vars($userDN);
+ $userDN = $this->substitute_vars($userDN);
} else {
$userDN = $this->search_userdn($rcmail);
}
@@ -64,7 +64,7 @@ class rcube_ldap_password
return PASSWORD_CONNECT_ERROR;
}
- $crypted_pass = self::hash_password($passwd, $rcmail->config->get('password_ldap_encodage'));
+ $crypted_pass = $this->hashPassword($passwd, $rcmail->config->get('password_ldap_encodage'));
$force = $rcmail->config->get('password_ldap_force_replace');
$pwattr = $rcmail->config->get('password_ldap_pwattr');
$lchattr = $rcmail->config->get('password_ldap_lchattr');
@@ -84,7 +84,7 @@ class rcube_ldap_password
}
// Crypt new samba password
- if ($smbpwattr && !($samba_pass = self::hash_password($passwd, 'samba'))) {
+ if ($smbpwattr && !($samba_pass = $this->hashPassword($passwd, 'samba'))) {
return PASSWORD_CRYPT_ERROR;
}
@@ -146,8 +146,8 @@ class rcube_ldap_password
return '';
}
- $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base'));
- $filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter'));
+ $base = $rcmail->config->get('password_ldap_search_base');
+ $filter = $this->substitute_vars($rcmail->config->get('password_ldap_search_filter'));
$options = array (
'scope' => 'sub',
'attributes' => array(),
@@ -163,25 +163,27 @@ class rcube_ldap_password
}
/**
- * Substitute %login, %name, %domain, %dc in $str
- * See plugin config for details
+ * Substitute %login, %name, %domain, %dc in $str.
+ * See plugin config for details.
*/
- static function substitute_vars($str)
+ function substitute_vars($str)
{
- $str = str_replace('%login', $_SESSION['username'], $str);
- $str = str_replace('%l', $_SESSION['username'], $str);
-
- $parts = explode('@', $_SESSION['username']);
-
- if (count($parts) == 2) {
- $dc = 'dc='.strtr($parts[1], array('.' => ',dc=')); // hierarchal domain string
-
- $str = str_replace('%name', $parts[0], $str);
- $str = str_replace('%n', $parts[0], $str);
- $str = str_replace('%dc', $dc, $str);
- $str = str_replace('%domain', $parts[1], $str);
- $str = str_replace('%d', $parts[1], $str);
- }
+ $rcmail = rcmail::get_instance();
+ $domain = $rcmail->user->get_username('domain');
+ $dc = 'dc='.strtr($domain, array('.' => ',dc=')); // hierarchal domain string
+
+ $str = str_replace(array(
+ '%login',
+ '%name',
+ '%domain',
+ '%dc',
+ ), array(
+ $_SESSION['username'],
+ $rcmail->user->get_username('local'),
+ $domain,
+ $dc,
+ ), $str
+ );
return $str;
}
@@ -190,109 +192,128 @@ class rcube_ldap_password
* Code originaly from the phpLDAPadmin development team
* http://phpldapadmin.sourceforge.net/
*
- * Hashes a password and returns the hash based on the specified enc_type
+ * Hashes a password and returns the hash based on the specified enc_type.
+ *
+ * @param string $passwordClear The password to hash in clear text.
+ * @param string $encodageType Standard LDAP encryption type which must be one of
+ * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
+ * @return string The hashed password.
+ *
*/
- static function hash_password($password_clear, $encodage_type)
+ function hashPassword( $passwordClear, $encodageType )
{
- $encodage_type = strtolower($encodage_type);
- switch ($encodage_type) {
+ $encodageType = strtolower( $encodageType );
+ switch( $encodageType ) {
case 'crypt':
- $crypted_password = '{CRYPT}' . crypt($password_clear, self::random_salt(2));
+ $cryptedPassword = '{CRYPT}' . crypt($passwordClear, $this->randomSalt(2));
break;
+
case 'ext_des':
- /* Extended DES crypt. see OpenBSD crypt man page */
- if (!defined('CRYPT_EXT_DES') || CRYPT_EXT_DES == 0) {
- /* Your system crypt library does not support extended DES encryption */
- return false;
+ // extended des crypt. see OpenBSD crypt man page.
+ if ( ! defined( 'CRYPT_EXT_DES' ) || CRYPT_EXT_DES == 0 ) {
+ // Your system crypt library does not support extended DES encryption.
+ return FALSE;
}
- $crypted_password = '{CRYPT}' . crypt($password_clear, '_' . self::random_salt(8));
+ $cryptedPassword = '{CRYPT}' . crypt( $passwordClear, '_' . $this->randomSalt(8) );
break;
+
case 'md5crypt':
- if (!defined('CRYPT_MD5') || CRYPT_MD5 == 0) {
- /* Your system crypt library does not support md5crypt encryption */
- return false;
+ if( ! defined( 'CRYPT_MD5' ) || CRYPT_MD5 == 0 ) {
+ // Your system crypt library does not support md5crypt encryption.
+ return FALSE;
}
- $crypted_password = '{CRYPT}' . crypt($password_clear, '$1$' . self::random_salt(9));
+ $cryptedPassword = '{CRYPT}' . crypt( $passwordClear , '$1$' . $this->randomSalt(9) );
break;
+
case 'blowfish':
- if (!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH == 0) {
- /* Your system crypt library does not support blowfish encryption */
- return false;
+ if( ! defined( 'CRYPT_BLOWFISH' ) || CRYPT_BLOWFISH == 0 ) {
+ // Your system crypt library does not support blowfish encryption.
+ return FALSE;
}
- /* Hardcoded to second blowfish version and set number of rounds */
- $crypted_password = '{CRYPT}' . crypt($password_clear, '$2a$12$' . self::random_salt(13));
+ // hardcoded to second blowfish version and set number of rounds
+ $cryptedPassword = '{CRYPT}' . crypt( $passwordClear , '$2a$12$' . $this->randomSalt(13) );
break;
+
case 'md5':
- $crypted_password = '{MD5}' . base64_encode(pack('H*', md5($password_clear)));
+ $cryptedPassword = '{MD5}' . base64_encode( pack( 'H*' , md5( $passwordClear) ) );
break;
+
case 'sha':
- if (function_exists('sha1')) {
- /* Use PHP 4.3.0+ sha1 function, if it is available */
- $crypted_password = '{SHA}' . base64_encode(pack('H*', sha1($password_clear)));
- } else if (function_exists('mhash')) {
- $crypted_password = '{SHA}' . base64_encode(mhash(MHASH_SHA1, $password_clear));
+ if( function_exists('sha1') ) {
+ // use php 4.3.0+ sha1 function, if it is available.
+ $cryptedPassword = '{SHA}' . base64_encode( pack( 'H*' , sha1( $passwordClear) ) );
+ } elseif( function_exists( 'mhash' ) ) {
+ $cryptedPassword = '{SHA}' . base64_encode( mhash( MHASH_SHA1, $passwordClear) );
} else {
- /* Your PHP install does not have the mhash() function */
- return false;
+ return FALSE; //Your PHP install does not have the mhash() function. Cannot do SHA hashes.
}
break;
+
case 'ssha':
- if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
- mt_srand((double) microtime() * 1000000 );
- $salt = mhash_keygen_s2k(MHASH_SHA1, $password_clear, substr(pack('h*', md5(mt_rand())), 0, 8), 4);
- $crypted_password = '{SSHA}' . base64_encode(mhash(MHASH_SHA1, $password_clear . $salt) . $salt);
+ if( function_exists( 'mhash' ) && function_exists( 'mhash_keygen_s2k' ) ) {
+ mt_srand( (double) microtime() * 1000000 );
+ $salt = mhash_keygen_s2k( MHASH_SHA1, $passwordClear, substr( pack( 'h*', md5( mt_rand() ) ), 0, 8 ), 4 );
+ $cryptedPassword = '{SSHA}'.base64_encode( mhash( MHASH_SHA1, $passwordClear.$salt ).$salt );
} else {
- /* Your PHP install does not have the mhash() function */
- return false;
+ return FALSE; //Your PHP install does not have the mhash() function. Cannot do SHA hashes.
}
break;
+
case 'smd5':
- if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
- mt_srand((double) microtime() * 1000000 );
- $salt = mhash_keygen_s2k(MHASH_MD5, $password_clear, substr(pack('h*', md5(mt_rand())), 0, 8), 4);
- $crypted_password = '{SMD5}' . base64_encode(mhash(MHASH_MD5, $password_clear . $salt) . $salt);
+ if( function_exists( 'mhash' ) && function_exists( 'mhash_keygen_s2k' ) ) {
+ mt_srand( (double) microtime() * 1000000 );
+ $salt = mhash_keygen_s2k( MHASH_MD5, $passwordClear, substr( pack( 'h*', md5( mt_rand() ) ), 0, 8 ), 4 );
+ $cryptedPassword = '{SMD5}'.base64_encode( mhash( MHASH_MD5, $passwordClear.$salt ).$salt );
} else {
- /* Your PHP install does not have the mhash() function */
- return false;
+ return FALSE; //Your PHP install does not have the mhash() function. Cannot do SHA hashes.
}
break;
+
case 'samba':
if (function_exists('hash')) {
- $crypted_password = hash('md4', rcube_charset::convert($password_clear, RCUBE_CHARSET, 'UTF-16LE'));
- $crypted_password = strtoupper($crypted_password);
+ $cryptedPassword = hash('md4', rcube_charset_convert($passwordClear, RCMAIL_CHARSET, 'UTF-16LE'));
+ $cryptedPassword = strtoupper($cryptedPassword);
} else {
/* Your PHP install does not have the hash() function */
return false;
}
break;
- case 'ad':
- $crypted_password = rcube_charset::convert('"' . $password_clear . '"', RCUBE_CHARSET, 'UTF-16LE');
- break;
+
case 'clear':
default:
- $crypted_password = $password_clear;
+ $cryptedPassword = $passwordClear;
}
- return $crypted_password;
+ return $cryptedPassword;
}
/**
* Code originaly from the phpLDAPadmin development team
* http://phpldapadmin.sourceforge.net/
*
- * Used to generate a random salt for crypt-style passwords
+ * Used to generate a random salt for crypt-style passwords. Salt strings are used
+ * to make pre-built hash cracking dictionaries difficult to use as the hash algorithm uses
+ * not only the user's password but also a randomly generated string. The string is
+ * stored as the first N characters of the hash for reference of hashing algorithms later.
+ *
+ * --- added 20021125 by bayu irawan <bayuir@divnet.telkom.co.id> ---
+ * --- ammended 20030625 by S C Rigler <srigler@houston.rr.com> ---
+ *
+ * @param int $length The length of the salt string to generate.
+ * @return string The generated salt string.
*/
- static function random_salt($length)
+ function randomSalt( $length )
{
- $possible = '0123456789' . 'abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . './';
+ $possible = '0123456789'.
+ 'abcdefghijklmnopqrstuvwxyz'.
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
+ './';
$str = '';
// mt_srand((double)microtime() * 1000000);
- while (strlen($str) < $length) {
+ while (strlen($str) < $length)
$str .= substr($possible, (rand() % strlen($possible)), 1);
- }
return $str;
}
-
}
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index 47e3b07de..01385f2d0 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -13,37 +13,21 @@
class rcube_ldap_simple_password
{
- private $debug = false;
-
function save($curpass, $passwd)
{
$rcmail = rcmail::get_instance();
- $this->debug = $rcmail->config->get('ldap_debug');
-
- $ldap_host = $rcmail->config->get('password_ldap_host');
- $ldap_port = $rcmail->config->get('password_ldap_port');
-
- $this->_debug("C: Connect to $ldap_host:$ldap_port");
-
// Connect
- if (!$ds = ldap_connect($ldap_host, $ldap_port)) {
- $this->_debug("S: NOT OK");
-
- rcube::raise_error(array(
- 'code' => 100, 'type' => 'ldap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Could not connect to LDAP server"
- ),
- true);
-
+ if (!$ds = ldap_connect($rcmail->config->get('password_ldap_host'), $rcmail->config->get('password_ldap_port'))) {
+ ldap_unbind($ds);
return PASSWORD_CONNECT_ERROR;
}
- $this->_debug("S: OK");
-
// Set protocol version
- ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $rcmail->config->get('password_ldap_version'));
+ if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $rcmail->config->get('password_ldap_version'))) {
+ ldap_unbind($ds);
+ return PASSWORD_CONNECT_ERROR;
+ }
// Start TLS
if ($rcmail->config->get('password_ldap_starttls')) {
@@ -53,19 +37,9 @@ class rcube_ldap_simple_password
}
}
- // include 'ldap' driver, we share some static methods with it
- require_once INSTALL_PATH . 'plugins/password/drivers/ldap.php';
-
- // other plugins might want to modify user DN
- $plugin = $rcmail->plugins->exec_hook('password_ldap_bind', array(
- 'user_dn' => '', 'conn' => $ds));
-
// Build user DN
- if (!empty($plugin['user_dn'])) {
- $user_dn = $plugin['user_dn'];
- }
- else if ($user_dn = $rcmail->config->get('password_ldap_userDN_mask')) {
- $user_dn = rcube_ldap_password::substitute_vars($user_dn);
+ if ($user_dn = $rcmail->config->get('password_ldap_userDN_mask')) {
+ $user_dn = $this->substitute_vars($user_dn);
}
else {
$user_dn = $this->search_userdn($rcmail, $ds);
@@ -89,13 +63,12 @@ class rcube_ldap_simple_password
break;
}
+ $crypted_pass = $this->hash_password($passwd, $rcmail->config->get('password_ldap_encodage'));
$lchattr = $rcmail->config->get('password_ldap_lchattr');
$pwattr = $rcmail->config->get('password_ldap_pwattr');
$smbpwattr = $rcmail->config->get('password_ldap_samba_pwattr');
$smblchattr = $rcmail->config->get('password_ldap_samba_lchattr');
$samba = $rcmail->config->get('password_ldap_samba');
- $pass_mode = $rcmail->config->get('password_ldap_encodage');
- $crypted_pass = rcube_ldap_password::hash_password($passwd, $pass_mode);
// Support password_ldap_samba option for backward compat.
if ($samba && !$smbpwattr) {
@@ -109,55 +82,40 @@ class rcube_ldap_simple_password
}
// Crypt new Samba password
- if ($smbpwattr && !($samba_pass = rcube_ldap_password::hash_password($passwd, 'samba'))) {
+ if ($smbpwattr && !($samba_pass = $this->hash_password($passwd, 'samba'))) {
return PASSWORD_CRYPT_ERROR;
}
- $this->_debug("C: Bind $binddn [pass: $bindpw]");
-
// Bind
if (!ldap_bind($ds, $binddn, $bindpw)) {
- $this->_debug("S: ".ldap_error($ds));
-
ldap_unbind($ds);
-
return PASSWORD_CONNECT_ERROR;
}
- $this->_debug("S: OK");
-
- $entry[$pwattr] = $crypted_pass;
+ $entree[$pwattr] = $crypted_pass;
// Update PasswordLastChange Attribute if desired
if ($lchattr) {
- $entry[$lchattr] = (int)(time() / 86400);
+ $entree[$lchattr] = (int)(time() / 86400);
}
// Update Samba password
if ($smbpwattr) {
- $entry[$smbpwattr] = $samba_pass;
+ $entree[$smbpwattr] = $samba_pass;
}
// Update Samba password last change
if ($smblchattr) {
- $entry[$smblchattr] = time();
+ $entree[$smblchattr] = time();
}
- $this->_debug("C: Modify $user_dn: " . print_r($entry, true));
-
- if (!ldap_modify($ds, $user_dn, $entry)) {
- $this->_debug("S: ".ldap_error($ds));
-
+ if (!ldap_modify($ds, $user_dn, $entree)) {
ldap_unbind($ds);
-
return PASSWORD_CONNECT_ERROR;
}
- $this->_debug("S: OK");
-
// All done, no error
ldap_unbind($ds);
-
return PASSWORD_SUCCESS;
}
@@ -168,57 +126,151 @@ 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');
-
- if (empty($search_user)) {
- return null;
+ /* Bind */
+ if (!ldap_bind($ds, $rcmail->config->get('password_ldap_searchDN'), $rcmail->config->get('password_ldap_searchPW'))) {
+ return false;
}
- $this->_debug("C: Bind $search_user [pass: $search_pass]");
+ /* Search for the DN */
+ if (!$sr = ldap_search($ds, $rcmail->config->get('password_ldap_search_base'), $this->substitute_vars($rcmail->config->get('password_ldap_search_filter')))) {
+ return false;
+ }
- // Bind
- if (!ldap_bind($ds, $search_user, $search_pass)) {
- $this->_debug("S: ".ldap_error($ds));
+ /* If no or more entries were found, return false */
+ if (ldap_count_entries($ds, $sr) != 1) {
return false;
}
- $this->_debug("S: OK");
+ return ldap_get_dn($ds, ldap_first_entry($ds, $sr));
+ }
- $search_base = $rcmail->config->get('password_ldap_search_base');
- $search_filter = $rcmail->config->get('password_ldap_search_filter');
+ /**
+ * Substitute %login, %name, %domain, %dc in $str
+ * See plugin config for details
+ */
+ function substitute_vars($str)
+ {
+ $str = str_replace('%login', $_SESSION['username'], $str);
+ $str = str_replace('%l', $_SESSION['username'], $str);
- $search_base = rcube_ldap_password::substitute_vars($search_base);
- $search_filter = rcube_ldap_password::substitute_vars($search_filter);
+ $parts = explode('@', $_SESSION['username']);
- $this->_debug("C: Search $search_base for $search_filter");
+ if (count($parts) == 2) {
+ $dc = 'dc='.strtr($parts[1], array('.' => ',dc=')); // hierarchal domain string
- // Search for the DN
- if (!$sr = ldap_search($ds, $search_base, $search_filter)) {
- $this->_debug("S: ".ldap_error($ds));
- return false;
+ $str = str_replace('%name', $parts[0], $str);
+ $str = str_replace('%n', $parts[0], $str);
+ $str = str_replace('%dc', $dc, $str);
+ $str = str_replace('%domain', $parts[1], $str);
+ $str = str_replace('%d', $parts[1], $str);
}
- $found = ldap_count_entries($ds, $sr);
-
- $this->_debug("S: OK [found $found records]");
+ return $str;
+ }
- // If no or more entries were found, return false
- if ($found != 1) {
- return false;
+ /**
+ * Code originaly from the phpLDAPadmin development team
+ * http://phpldapadmin.sourceforge.net/
+ *
+ * Hashes a password and returns the hash based on the specified enc_type
+ */
+ function hash_password($password_clear, $encodage_type)
+ {
+ $encodage_type = strtolower($encodage_type);
+ switch ($encodage_type) {
+ case 'crypt':
+ $crypted_password = '{CRYPT}' . crypt($password_clear, $this->random_salt(2));
+ break;
+ case 'ext_des':
+ /* Extended DES crypt. see OpenBSD crypt man page */
+ if (!defined('CRYPT_EXT_DES') || CRYPT_EXT_DES == 0) {
+ /* Your system crypt library does not support extended DES encryption */
+ return false;
+ }
+ $crypted_password = '{CRYPT}' . crypt($password_clear, '_' . $this->random_salt(8));
+ break;
+ case 'md5crypt':
+ if (!defined('CRYPT_MD5') || CRYPT_MD5 == 0) {
+ /* Your system crypt library does not support md5crypt encryption */
+ return false;
+ }
+ $crypted_password = '{CRYPT}' . crypt($password_clear, '$1$' . $this->random_salt(9));
+ break;
+ case 'blowfish':
+ if (!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH == 0) {
+ /* Your system crypt library does not support blowfish encryption */
+ return false;
+ }
+ /* Hardcoded to second blowfish version and set number of rounds */
+ $crypted_password = '{CRYPT}' . crypt($password_clear, '$2a$12$' . $this->random_salt(13));
+ break;
+ case 'md5':
+ $crypted_password = '{MD5}' . base64_encode(pack('H*', md5($password_clear)));
+ break;
+ case 'sha':
+ if (function_exists('sha1')) {
+ /* Use PHP 4.3.0+ sha1 function, if it is available */
+ $crypted_password = '{SHA}' . base64_encode(pack('H*', sha1($password_clear)));
+ } else if (function_exists('mhash')) {
+ $crypted_password = '{SHA}' . base64_encode(mhash(MHASH_SHA1, $password_clear));
+ } else {
+ /* Your PHP install does not have the mhash() function */
+ return false;
+ }
+ break;
+ case 'ssha':
+ if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
+ mt_srand((double) microtime() * 1000000 );
+ $salt = mhash_keygen_s2k(MHASH_SHA1, $password_clear, substr(pack('h*', md5(mt_rand())), 0, 8), 4);
+ $crypted_password = '{SSHA}' . base64_encode(mhash(MHASH_SHA1, $password_clear . $salt) . $salt);
+ } else {
+ /* Your PHP install does not have the mhash() function */
+ return false;
+ }
+ break;
+ case 'smd5':
+ if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
+ mt_srand((double) microtime() * 1000000 );
+ $salt = mhash_keygen_s2k(MHASH_MD5, $password_clear, substr(pack('h*', md5(mt_rand())), 0, 8), 4);
+ $crypted_password = '{SMD5}' . base64_encode(mhash(MHASH_MD5, $password_clear . $salt) . $salt);
+ } else {
+ /* Your PHP install does not have the mhash() function */
+ return false;
+ }
+ break;
+ case 'samba':
+ if (function_exists('hash')) {
+ $crypted_password = hash('md4', rcube_charset_convert($password_clear, RCMAIL_CHARSET, 'UTF-16LE'));
+ $crypted_password = strtoupper($crypted_password);
+ } else {
+ /* Your PHP install does not have the hash() function */
+ return false;
+ }
+ break;
+ case 'clear':
+ default:
+ $crypted_password = $password_clear;
}
- return ldap_get_dn($ds, ldap_first_entry($ds, $sr));
+ return $crypted_password;
}
/**
- * Prints debug info to the log
+ * Code originaly from the phpLDAPadmin development team
+ * http://phpldapadmin.sourceforge.net/
+ *
+ * Used to generate a random salt for crypt-style passwords
*/
- private function _debug($str)
+ function random_salt($length)
{
- if ($this->debug) {
- rcube::write_log('ldap', $str);
+ $possible = '0123456789' . 'abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . './';
+ $str = '';
+ // mt_srand((double)microtime() * 1000000);
+
+ while (strlen($str) < $length) {
+ $str .= substr($possible, (rand() % strlen($possible)), 1);
}
- }
+ return $str;
+ }
}
diff --git a/plugins/password/drivers/pam.php b/plugins/password/drivers/pam.php
index 4d0ba1656..15a802c74 100644
--- a/plugins/password/drivers/pam.php
+++ b/plugins/password/drivers/pam.php
@@ -21,7 +21,7 @@ class rcube_pam_password
}
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -30,7 +30,7 @@ class rcube_pam_password
}
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/pw_usermod.php b/plugins/password/drivers/pw_usermod.php
index 237e275a7..5b92fcbfb 100644
--- a/plugins/password/drivers/pw_usermod.php
+++ b/plugins/password/drivers/pw_usermod.php
@@ -28,7 +28,7 @@ class rcube_pw_usermod_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php
index 8776eff2e..9380cf838 100644
--- a/plugins/password/drivers/sasl.php
+++ b/plugins/password/drivers/sasl.php
@@ -32,7 +32,7 @@ class rcube_sasl_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/smb.php b/plugins/password/drivers/smb.php
index 9f2b96afa..88021156f 100644
--- a/plugins/password/drivers/smb.php
+++ b/plugins/password/drivers/smb.php
@@ -26,15 +26,13 @@ class rcube_smb_password
public function save($currpass, $newpass)
{
- $host = rcmail::get_instance()->config->get('password_smb_host','localhost');
- $bin = rcmail::get_instance()->config->get('password_smb_cmd','/usr/bin/smbpasswd');
+ $host = rcmail::get_instance()->config->get('password_smb_host','localhost');
+ $bin = rcmail::get_instance()->config->get('password_smb_cmd','/usr/bin/smbpasswd');
$username = $_SESSION['username'];
- $host = rcube_utils::parse_host($host);
- $tmpfile = tempnam(sys_get_temp_dir(),'smb');
- $cmd = $bin . ' -r ' . $host . ' -s -U "' . $username . '" > ' . $tmpfile . ' 2>&1';
- $handle = @popen($cmd, 'w');
-
+ $tmpfile = tempnam(sys_get_temp_dir(),'smb');
+ $cmd = $bin . ' -r ' . $host . ' -s -U "' . $username . '" > ' . $tmpfile . ' 2>&1';
+ $handle = @popen($cmd, 'w');
fputs($handle, $currpass."\n");
fputs($handle, $newpass."\n");
fputs($handle, $newpass."\n");
@@ -46,7 +44,7 @@ class rcube_smb_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index 7a51dfe44..8c8dc87b5 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -34,9 +34,8 @@ class rcube_sql_password
$db = $rcmail->get_dbh();
}
- if ($db->is_error()) {
+ if ($err = $db->is_error())
return PASSWORD_ERROR;
- }
// crypted password
if (strpos($sql, '%c') !== FALSE) {
@@ -118,7 +117,7 @@ class rcube_sql_password
// hashed passwords
if (preg_match('/%[n|q]/', $sql)) {
if (!extension_loaded('hash')) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -165,14 +164,14 @@ class rcube_sql_password
// convert domains to/from punnycode
if ($rcmail->config->get('password_idn_ascii')) {
- $domain_part = rcube_utils::idn_to_ascii($domain_part);
- $username = rcube_utils::idn_to_ascii($username);
- $host = rcube_utils::idn_to_ascii($host);
+ $domain_part = rcube_idn_to_ascii($domain_part);
+ $username = rcube_idn_to_ascii($username);
+ $host = rcube_idn_to_ascii($host);
}
else {
- $domain_part = rcube_utils::idn_to_utf8($domain_part);
- $username = rcube_utils::idn_to_utf8($username);
- $host = rcube_utils::idn_to_utf8($host);
+ $domain_part = rcube_idn_to_utf8($domain_part);
+ $username = rcube_idn_to_utf8($username);
+ $host = rcube_idn_to_utf8($host);
}
// at least we should always have the local part
@@ -185,7 +184,7 @@ class rcube_sql_password
if (!$db->is_error()) {
if (strtolower(substr(trim($sql),0,6)) == 'select') {
- if ($db->fetch_array($res))
+ if ($result = $db->fetch_array($res))
return PASSWORD_SUCCESS;
} else {
// This is the good case: 1 row updated
diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php
index 36c54664b..40f5c2529 100644
--- a/plugins/password/drivers/virtualmin.php
+++ b/plugins/password/drivers/virtualmin.php
@@ -66,7 +66,7 @@ class rcube_virtualmin_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php
index 47beb2178..33a49ffe3 100644
--- a/plugins/password/drivers/xmail.php
+++ b/plugins/password/drivers/xmail.php
@@ -10,10 +10,10 @@
* Setup xmail_host, xmail_user, xmail_pass and xmail_port into
* config.inc.php of password plugin as follows:
*
- * $config['xmail_host'] = 'localhost';
- * $config['xmail_user'] = 'YourXmailControlUser';
- * $config['xmail_pass'] = 'YourXmailControlPass';
- * $config['xmail_port'] = 6017;
+ * $rcmail_config['xmail_host'] = 'localhost';
+ * $rcmail_config['xmail_user'] = 'YourXmailControlUser';
+ * $rcmail_config['xmail_pass'] = 'YourXmailControlPass';
+ * $rcmail_config['xmail_port'] = 6017;
*
*/
@@ -32,7 +32,7 @@ class rcube_xmail_password
$xmail->port = $rcmail->config->get('xmail_port');
if (!$xmail->connect()) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -42,7 +42,7 @@ class rcube_xmail_password
}
else if (!$xmail->send("userpasswd\t".$domain."\t".$user."\t".$newpass."\n")) {
$xmail->close();
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -67,7 +67,7 @@ class XMail {
function send($msg)
{
socket_write($this->socket,$msg);
- if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
return false;
}
return true;
@@ -85,7 +85,7 @@ class XMail {
return false;
}
- if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
socket_close($this->socket);
return false;
}
diff --git a/plugins/password/localization/az_AZ.inc b/plugins/password/localization/az_AZ.inc
index 18fa758f4..c99ab2ab3 100644
--- a/plugins/password/localization/az_AZ.inc
+++ b/plugins/password/localization/az_AZ.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Şifrəni dəyiş';
$labels['curpasswd'] = 'Hal-hazırki şifrə:';
$labels['newpasswd'] = 'Yeni şifrə:';
$labels['confpasswd'] = 'Yeni şifrə: (təkrar)';
+
+$messages = array();
$messages['nopassword'] = 'Yeni şifrəni daxil edin.';
$messages['nocurpassword'] = 'Hal-hazırda istifadə etdiyiniz şifrəni daxil edin.';
$messages['passwordincorrect'] = 'Yalnış şifrə daxil etdiniz.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Yeni şifrənin saxlanılması mümkün olmadı.';
$messages['passwordshort'] = 'Yeni şifrə $length simvoldan uzun olmalıdır.';
$messages['passwordweak'] = 'Şifrədə heç olmasa minimum bir rəqəm və simvol olmalıdır.';
$messages['passwordforbidden'] = 'Şifrədə icazə verilməyən simvollar vardır.';
+
?>
diff --git a/plugins/password/localization/ber.inc b/plugins/password/localization/ber.inc
index 046e45733..12fe4442e 100644
--- a/plugins/password/localization/ber.inc
+++ b/plugins/password/localization/ber.inc
@@ -13,4 +13,5 @@
+-----------------------------------------------------------------------+
*/
+$labels = array();
diff --git a/plugins/password/localization/bg_BG.inc b/plugins/password/localization/bg_BG.inc
index c1c8b9b7a..9bd8a4a17 100644
--- a/plugins/password/localization/bg_BG.inc
+++ b/plugins/password/localization/bg_BG.inc
@@ -15,18 +15,23 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Промяна на парола';
$labels['curpasswd'] = 'Текуща парола:';
$labels['newpasswd'] = 'Нова парола:';
-$labels['confpasswd'] = 'Повторно нова парола:';
+$labels['confpasswd'] = 'Повторете:';
+
+$messages = array();
$messages['nopassword'] = 'Моля въведете нова парола.';
-$messages['nocurpassword'] = 'Моля въведете текущата парола.';
+$messages['nocurpassword'] = 'Моля въведете текущата.';
$messages['passwordincorrect'] = 'Невалидна текуща парола.';
-$messages['passwordinconsistency'] = 'Паролите не съвпадат, опитайте отново.';
-$messages['crypterror'] = 'Невъзможна промяна на паролата. Липсва PHP функция за криптиране.';
-$messages['connecterror'] = 'Невъзможна промяна на паролата. Грешка при свързване със сървър.';
-$messages['internalerror'] = 'Паролата не може да бъде променена.';
+$messages['passwordinconsistency'] = 'Паролите не съвпадат, опитайте пак.';
+$messages['crypterror'] = 'Паролата не може да бъде сменена. Грешка в криптирането.';
+$messages['connecterror'] = 'Паролата не може да бъде сменена. Грешка в свързването.';
+$messages['internalerror'] = 'Паролата не може да бъде сменена.';
$messages['passwordshort'] = 'Паролата трябва да е дълга поне $length знака.';
-$messages['passwordweak'] = 'Паролата трябва да включва поне един цифра и поне един знак за пунктуация.';
-$messages['passwordforbidden'] = 'Паролата съдържа непозволени символи.';
+$messages['passwordweak'] = 'Паролата трябва да включва поне един азбучен символ и една пунктуация.';
+$messages['passwordforbidden'] = 'Паролата съдържа невалидни знаци.';
+
?>
diff --git a/plugins/password/localization/br.inc b/plugins/password/localization/br.inc
index 423fc74df..f07786b39 100644
--- a/plugins/password/localization/br.inc
+++ b/plugins/password/localization/br.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Kemmañ ar ger-tremen';
$labels['curpasswd'] = 'Ger-tremen red :';
$labels['newpasswd'] = 'Ger-tremen nevez :';
$labels['confpasswd'] = 'Kadarnaat ar ger-tremen :';
+
+$messages = array();
$messages['nopassword'] = 'Roit ur ger-tremen nevez, mar plij.';
$messages['nocurpassword'] = 'Roit ar ger-tremen red, mar plij.';
$messages['passwordincorrect'] = 'Direizh eo ar ger-tremen red.';
@@ -27,5 +31,7 @@ $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'] = 'Password must include at least one number and one punctuation character.';
$messages['passwordforbidden'] = 'Arouezennoù difennet zo er ger-tremen.';
+
?>
diff --git a/plugins/password/localization/bs_BA.inc b/plugins/password/localization/bs_BA.inc
index f030fef87..c98a49d97 100644
--- a/plugins/password/localization/bs_BA.inc
+++ b/plugins/password/localization/bs_BA.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Promijeni šifru';
$labels['curpasswd'] = 'Trenutna šifra:';
$labels['newpasswd'] = 'Nova šifra:';
$labels['confpasswd'] = 'Potvrdite novu šifru:';
+
+$messages = array();
$messages['nopassword'] = 'Molimo vas da upišete novu šifru.';
$messages['nocurpassword'] = 'Molimo vas da upišete trenutnu šifru.';
$messages['passwordincorrect'] = 'Trenutna šifra je netačna.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/ca_ES.inc b/plugins/password/localization/ca_ES.inc
index 3ab4ed1ad..95f5df833 100644
--- a/plugins/password/localization/ca_ES.inc
+++ b/plugins/password/localization/ca_ES.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Canvia la contrasenya';
$labels['curpasswd'] = 'Contrasenya actual:';
$labels['newpasswd'] = 'Nova contrasenya:';
$labels['confpasswd'] = 'Confirmeu la nova contrasenya:';
+
+$messages = array();
$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.';
@@ -29,4 +33,5 @@ $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['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/cs_CZ.inc b/plugins/password/localization/cs_CZ.inc
index 46076b0a0..857961c61 100644
--- a/plugins/password/localization/cs_CZ.inc
+++ b/plugins/password/localization/cs_CZ.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Změna hesla';
$labels['curpasswd'] = 'Aktuální heslo:';
$labels['newpasswd'] = 'Nové heslo:';
$labels['confpasswd'] = 'Nové heslo (pro kontrolu):';
+
+$messages = array();
$messages['nopassword'] = 'Prosím zadejte nové heslo.';
$messages['nocurpassword'] = 'Prosím zadejte aktuální heslo.';
$messages['passwordincorrect'] = 'Zadané aktuální heslo není správné.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/cy_GB.inc b/plugins/password/localization/cy_GB.inc
index 16fc65447..c43b7473b 100644
--- a/plugins/password/localization/cy_GB.inc
+++ b/plugins/password/localization/cy_GB.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Newid Cyfrinair';
$labels['curpasswd'] = 'Cyfrinair Presennol:';
$labels['newpasswd'] = 'Cyfrinair Newydd:';
$labels['confpasswd'] = 'Cadarnhau Cyfrinair Newydd:';
+
+$messages = array();
$messages['nopassword'] = 'Rhowch eich cyfrinair newydd.';
$messages['nocurpassword'] = 'Rhowch eich cyfrinair presennol.';
$messages['passwordincorrect'] = 'Roedd y cyfrinair presennol yn anghywir.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Methwyd cadw\'r cyfrinair newydd.';
$messages['passwordshort'] = 'Rhaid i\'r cyfrinair fod o leia $length llythyren o hyd.';
$messages['passwordweak'] = 'Rhaid i\'r cyfrinair gynnwys o leia un rhif a un cymeriad atalnodi.';
$messages['passwordforbidden'] = 'Mae\'r cyfrinair yn cynnwys llythrennau wedi gwahardd.';
+
?>
diff --git a/plugins/password/localization/da_DK.inc b/plugins/password/localization/da_DK.inc
index 76e161db4..bc8fb26df 100644
--- a/plugins/password/localization/da_DK.inc
+++ b/plugins/password/localization/da_DK.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Skift adgangskode';
$labels['curpasswd'] = 'Nuværende adgangskode:';
$labels['newpasswd'] = 'Ny adgangskode:';
$labels['confpasswd'] = 'Bekræft ny adgangskode:';
+
+$messages = array();
$messages['nopassword'] = 'Indtast venligst en ny adgangskode.';
$messages['nocurpassword'] = 'Indtast venligst nuværende adgangskode.';
$messages['passwordincorrect'] = 'Nuværende adgangskode er forkert.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Kunne ikke gemme den nye adgangskode.';
$messages['passwordshort'] = 'Adgangskoden skal være mindst $length tegn lang.';
$messages['passwordweak'] = 'Adgangskoden skal indeholde mindst et tal og et tegnsætningstegn (-.,)';
$messages['passwordforbidden'] = 'Adgangskoden indeholder forbudte tegn.';
+
?>
diff --git a/plugins/password/localization/de_CH.inc b/plugins/password/localization/de_CH.inc
index a446e1b52..6016ffeac 100644
--- a/plugins/password/localization/de_CH.inc
+++ b/plugins/password/localization/de_CH.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Passwort ändern';
$labels['curpasswd'] = 'Aktuelles Passwort';
$labels['newpasswd'] = 'Neues Passwort';
$labels['confpasswd'] = 'Passwort Wiederholung';
+
+$messages = array();
$messages['nopassword'] = 'Bitte geben Sie ein neues Passwort ein';
$messages['nocurpassword'] = 'Bitte geben Sie Ihr aktuelles Passwort an';
$messages['passwordincorrect'] = 'Das aktuelle Passwort ist nicht korrekt';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/de_DE.inc b/plugins/password/localization/de_DE.inc
index fab78fce9..2190fd39a 100644
--- a/plugins/password/localization/de_DE.inc
+++ b/plugins/password/localization/de_DE.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Kennwort ändern';
$labels['curpasswd'] = 'Aktuelles Kennwort:';
$labels['newpasswd'] = 'Neues Kennwort:';
$labels['confpasswd'] = 'Neues Kennwort bestätigen:';
+
+$messages = array();
$messages['nopassword'] = 'Bitte geben Sie ein neues Kennwort ein.';
$messages['nocurpassword'] = 'Bitte geben Sie ihr aktuelles Kennwort ein.';
$messages['passwordincorrect'] = 'Das aktuelle Kennwort ist falsch.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/en_GB.inc b/plugins/password/localization/en_GB.inc
index 1f1b4e286..d7d192280 100644
--- a/plugins/password/localization/en_GB.inc
+++ b/plugins/password/localization/en_GB.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Change Password';
$labels['curpasswd'] = 'Current Password:';
$labels['newpasswd'] = 'New Password:';
$labels['confpasswd'] = 'Confirm New Password:';
+
+$messages = array();
$messages['nopassword'] = 'Please enter a new password.';
$messages['nocurpassword'] = 'Please enter the current password.';
$messages['passwordincorrect'] = 'Current password is incorrect.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'New password could not be saved.';
$messages['passwordshort'] = 'Password must be at least $length characters long.';
$messages['passwordweak'] = 'Password must include at least one number and one symbol.';
$messages['passwordforbidden'] = 'Password contains forbidden characters.';
+
?>
diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc
index a4c077fe5..dd57c1318 100644
--- a/plugins/password/localization/en_US.inc
+++ b/plugins/password/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/password/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Password plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/password/localization/eo.inc b/plugins/password/localization/eo.inc
index d985c18e6..f99004c63 100644
--- a/plugins/password/localization/eo.inc
+++ b/plugins/password/localization/eo.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Ŝanĝi pasvorton';
$labels['curpasswd'] = 'Nuna pasvorto:';
$labels['newpasswd'] = 'Nova pasvorto:';
$labels['confpasswd'] = 'Konfirmi novan pasvorton:';
+
+$messages = array();
$messages['nopassword'] = 'Bonvole tajpu novan pasvorton.';
$messages['nocurpassword'] = 'Bonvole tajpu nunan pasvorton.';
$messages['passwordincorrect'] = 'Nuna pasvorto nekorekta.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Nova pasvorto ne konserveblas.';
$messages['passwordshort'] = 'Pasvorto longu almenaŭ $length signojn.';
$messages['passwordweak'] = 'La pasvorto enhavu almenaŭ unu ciferon kaj unu interpunktan signon.';
$messages['passwordforbidden'] = 'La pasvorto enhavas malpermesitajn signojn.';
+
?>
diff --git a/plugins/password/localization/es_AR.inc b/plugins/password/localization/es_AR.inc
index 47589cfc7..8edc8feae 100644
--- a/plugins/password/localization/es_AR.inc
+++ b/plugins/password/localization/es_AR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Cambiar Contraseña';
$labels['curpasswd'] = 'Contraseña Actual:';
$labels['newpasswd'] = 'Contraseña Nueva:';
$labels['confpasswd'] = 'Confirmar Contraseña:';
+
+$messages = array();
$messages['nopassword'] = 'Por favor introduce una nueva contraseña.';
$messages['nocurpassword'] = 'Por favor introduce la contraseña actual.';
$messages['passwordincorrect'] = 'Contraseña actual incorrecta.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/es_ES.inc b/plugins/password/localization/es_ES.inc
index 80ee2e9a1..336666eb5 100644
--- a/plugins/password/localization/es_ES.inc
+++ b/plugins/password/localization/es_ES.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Cambiar contraseña';
$labels['curpasswd'] = 'Contraseña actual:';
$labels['newpasswd'] = 'Contraseña nueva:';
$labels['confpasswd'] = 'Confirmar contraseña:';
+
+$messages = array();
$messages['nopassword'] = 'Por favor introduzca una contraseña nueva.';
$messages['nocurpassword'] = 'Por favor introduzca la contraseña actual.';
$messages['passwordincorrect'] = 'La contraseña actual es incorrecta.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/et_EE.inc b/plugins/password/localization/et_EE.inc
index e1c524dcf..b93d32540 100644
--- a/plugins/password/localization/et_EE.inc
+++ b/plugins/password/localization/et_EE.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Muuda parooli';
$labels['curpasswd'] = 'Vana parool:';
$labels['newpasswd'] = 'Uus parool:';
$labels['confpasswd'] = 'Uus parool uuesti:';
+
+$messages = array();
$messages['nopassword'] = 'Palun sisesta uus parool.';
$messages['nocurpassword'] = 'Palun sisesta vana parool.';
$messages['passwordincorrect'] = 'Vana parool on vale.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Uue parooli andmebaasi salvestamine nurjus.';
$messages['passwordshort'] = 'Parool peab olema vähemalt $length märki pikk.';
$messages['passwordweak'] = 'Parool peab sisaldama vähemalt üht numbrit ja märki.';
$messages['passwordforbidden'] = 'Parool sisaldab keelatud märki.';
+
?>
diff --git a/plugins/password/localization/fa_IR.inc b/plugins/password/localization/fa_IR.inc
index 5f9285770..2cf126689 100644
--- a/plugins/password/localization/fa_IR.inc
+++ b/plugins/password/localization/fa_IR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'تغییر گذرواژه';
$labels['curpasswd'] = 'گذرواژه فعلی';
$labels['newpasswd'] = 'گذرواژه جدید';
$labels['confpasswd'] = 'تایید گذرواژه جدید';
+
+$messages = array();
$messages['nopassword'] = 'گذرواژه جدید را وارد نمایید';
$messages['nocurpassword'] = 'گذرواژه فعلی را وارد نمایید';
$messages['passwordincorrect'] = 'گذرواژه فعلی اشتباه است';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'گذرواژه جدید ذخیره نشد';
$messages['passwordshort'] = 'گذرواژه باید حداقل $length کاراکتر طول داشته باشد.';
$messages['passwordweak'] = 'گذرواژه باید شامل حداقل یک عدد و یک کاراکتر نشانه‌ای باشد.';
$messages['passwordforbidden'] = 'گذرواژه شما کاراکترهای غیرمجاز است.';
+
?>
diff --git a/plugins/password/localization/fi_FI.inc b/plugins/password/localization/fi_FI.inc
index 3b6735bec..2098cf6c3 100644
--- a/plugins/password/localization/fi_FI.inc
+++ b/plugins/password/localization/fi_FI.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Vaihda salasana';
$labels['curpasswd'] = 'Nykyinen salasana:';
$labels['newpasswd'] = 'Uusi salasana:';
$labels['confpasswd'] = 'Vahvista uusi salasana:';
+
+$messages = array();
$messages['nopassword'] = 'Syötä uusi salasana.';
$messages['nocurpassword'] = 'Syötä nykyinen salasana.';
$messages['passwordincorrect'] = 'Nykyinen salasana on väärin.';
@@ -29,4 +33,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ä.';
+
?>
diff --git a/plugins/password/localization/fr_FR.inc b/plugins/password/localization/fr_FR.inc
index c38abc558..66b43784e 100644
--- a/plugins/password/localization/fr_FR.inc
+++ b/plugins/password/localization/fr_FR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Changer le mot de passe';
$labels['curpasswd'] = 'Mot de passe actuel:';
$labels['newpasswd'] = 'Nouveau mot de passe:';
$labels['confpasswd'] = 'Confirmez le nouveau mot de passe:';
+
+$messages = array();
$messages['nopassword'] = 'Veuillez saisir le nouveau mot de passe.';
$messages['nocurpassword'] = 'Veuillez saisir le mot de passe actuel.';
$messages['passwordincorrect'] = 'Mot de passe actuel incorrect.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Impossible d\'enregistrer le nouveau mot de passe.
$messages['passwordshort'] = 'Le mot de passe doit être composé d\'au moins $length caractères.';
$messages['passwordweak'] = 'Le mot de passe doit contenir au moins un chiffre et un signe de ponctuation.';
$messages['passwordforbidden'] = 'Le mot de passe contient des caractères interdits.';
+
?>
diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc
index f738c62a0..245d1c634 100644
--- a/plugins/password/localization/gl_ES.inc
+++ b/plugins/password/localization/gl_ES.inc
@@ -15,18 +15,23 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Cambiar contrasinal';
$labels['curpasswd'] = 'Contrasinal actual:';
$labels['newpasswd'] = 'Contrasinal novo:';
$labels['confpasswd'] = 'Confirmar contrasinal:';
+
+$messages = array();
$messages['nopassword'] = 'Por favor, introduza un contrasinal novo.';
$messages['nocurpassword'] = 'Por favor, introduza o contrasinal actual.';
$messages['passwordincorrect'] = 'O contrasinal actual é incorrecto.';
-$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténteo outra vez.';
+$messages['passwordinconsistency'] = 'Os contrasinals non coinciden. Por favor, inténteo de novo.';
$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['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/he_IL.inc b/plugins/password/localization/he_IL.inc
index ce05ea59c..005a8e9d8 100644
--- a/plugins/password/localization/he_IL.inc
+++ b/plugins/password/localization/he_IL.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'שינוי סיסמה';
$labels['curpasswd'] = 'סיסמה נוכחית:';
$labels['newpasswd'] = 'סיסמה חדשה:';
$labels['confpasswd'] = 'אימות הסיסמה החדשה:';
+
+$messages = array();
$messages['nopassword'] = 'נא להקליד סיסמה חדשה';
$messages['nocurpassword'] = 'נא להקיש הסיסמה הנוכחית';
$messages['passwordincorrect'] = 'הוקשה סיסמה נוכחית שגויה';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'לא ניתן לשמור על הסיסמה החד
$messages['passwordshort'] = 'הסיסמה צריכה להיות לפחות בעלת $length תווים';
$messages['passwordweak'] = 'הסיסמה חייבת לכלול לפחות סיפרה אחת ולפחות סימן פיסוק אחד.';
$messages['passwordforbidden'] = 'הסיסמה מכילה תווים אסורים.';
+
?>
diff --git a/plugins/password/localization/hr_HR.inc b/plugins/password/localization/hr_HR.inc
index 44b62b2af..f97f5a44c 100644
--- a/plugins/password/localization/hr_HR.inc
+++ b/plugins/password/localization/hr_HR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Promijeni zaporku';
$labels['curpasswd'] = 'Važeća zaporka:';
$labels['newpasswd'] = 'Nova zaporka:';
$labels['confpasswd'] = 'Potvrda nove zaporke:';
+
+$messages = array();
$messages['nopassword'] = 'Molimo unesite novu zaporku.';
$messages['nocurpassword'] = 'Molimo unesite trenutnu zaporku.';
$messages['passwordincorrect'] = 'Trenutna zaporka je nevažeća.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Nemoguće promijeniti zaporku.';
$messages['passwordshort'] = 'Zaporka mora sadržavati barem $length znakova.';
$messages['passwordweak'] = 'Zaporka mora sadržavati barem jedanu znamenku i jedan interpunkcijski znak.';
$messages['passwordforbidden'] = 'Zaporka sadrži nedozvoljene znakove.';
+
?>
diff --git a/plugins/password/localization/hu_HU.inc b/plugins/password/localization/hu_HU.inc
index e9167b0c9..6b6077115 100644
--- a/plugins/password/localization/hu_HU.inc
+++ b/plugins/password/localization/hu_HU.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Jelszó módosítás';
$labels['curpasswd'] = 'Jelenlegi jelszó:';
$labels['newpasswd'] = 'Új jelszó:';
$labels['confpasswd'] = 'Új jelszó mégegyszer:';
+
+$messages = array();
$messages['nopassword'] = 'Kérjük adja meg az új jelszót.';
$messages['nocurpassword'] = 'Kérjük adja meg a jelenlegi jelszót.';
$messages['passwordincorrect'] = 'Érvénytelen a jelenlegi jelszó.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/hy_AM.inc b/plugins/password/localization/hy_AM.inc
index ebca6cd85..b30f31894 100644
--- a/plugins/password/localization/hy_AM.inc
+++ b/plugins/password/localization/hy_AM.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Գաղտնաբառի փոփոխում';
$labels['curpasswd'] = 'Առկա գաղտնաբառը`';
$labels['newpasswd'] = 'Նոր գաղտնաբառը`';
$labels['confpasswd'] = 'Կրկնեք նոր գաղտնաբառը`';
+
+$messages = array();
$messages['nopassword'] = 'Ներմուցեք նոր գաղտնաբառը։';
$messages['nocurpassword'] = 'Ներմուցեք առկա գաղտնաբառը։';
$messages['passwordincorrect'] = 'Առկա գաղտնաբառը սխալ է։';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Նոր գաղտնաբառի պահպանումը
$messages['passwordshort'] = 'Գաղտնաբառերը պետք է լինեն առնվազն $length նիշ երկարությամբ։';
$messages['passwordweak'] = 'Գաղտնաբառերը պետք է պարունակեն առնվազն մեկ թիվ և մեկ կետադրական նիշ։';
$messages['passwordforbidden'] = 'Գաղտնաբառը պարունակում է արգելված նիշ։';
+
?>
diff --git a/plugins/password/localization/id_ID.inc b/plugins/password/localization/id_ID.inc
index b7b0cde8c..5026de259 100644
--- a/plugins/password/localization/id_ID.inc
+++ b/plugins/password/localization/id_ID.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Ubah Sandi';
$labels['curpasswd'] = 'Sandi saat ini:';
$labels['newpasswd'] = 'Sandi Baru:';
$labels['confpasswd'] = 'Konfirmasi Sandi Baru:';
+
+$messages = array();
$messages['nopassword'] = 'Masukkan sandi baru.';
$messages['nocurpassword'] = 'Masukkan sandi saat ini.';
$messages['passwordincorrect'] = 'Sandi saat ini salah.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Tidak dapat menyimpan sandi baru.';
$messages['passwordshort'] = 'Panjang password minimal $length karakter';
$messages['passwordweak'] = 'Sandi harus menyertakan setidaknya satu angka dan satu tanda baca.';
$messages['passwordforbidden'] = 'Sandi mengandung karakter terlarang.';
+
?>
diff --git a/plugins/password/localization/it_IT.inc b/plugins/password/localization/it_IT.inc
index ddb83ca82..6ce2f7499 100644
--- a/plugins/password/localization/it_IT.inc
+++ b/plugins/password/localization/it_IT.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Modifica la Password';
$labels['curpasswd'] = 'Password corrente:';
$labels['newpasswd'] = 'Nuova password:';
$labels['confpasswd'] = 'Conferma la nuova Password:';
+
+$messages = array();
$messages['nopassword'] = 'Per favore inserire la nuova password.';
$messages['nocurpassword'] = 'Per favore inserire la password corrente.';
$messages['passwordincorrect'] = 'La password corrente non è corretta.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/ja_JP.inc b/plugins/password/localization/ja_JP.inc
index cc5a1173d..6abea5348 100644
--- a/plugins/password/localization/ja_JP.inc
+++ b/plugins/password/localization/ja_JP.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'パスワードの変更';
$labels['curpasswd'] = '現在のパスワード:';
$labels['newpasswd'] = '新しいパスワード:';
$labels['confpasswd'] = '新しいパスワード (確認):';
+
+$messages = array();
$messages['nopassword'] = '新しいパスワードを入力してください。';
$messages['nocurpassword'] = '現在のパスワードを入力してください。';
$messages['passwordincorrect'] = '現在のパスワードが間違っています。';
@@ -29,4 +33,5 @@ $messages['internalerror'] = '新しいパスワードを保存できません
$messages['passwordshort'] = 'パスワードは少なくとも $length 文字の長さが必要です。';
$messages['passwordweak'] = 'パスワードは少なくとも数字の 1 文字と記号の 1 文字を含んでいなければなりません。';
$messages['passwordforbidden'] = 'パスワードに禁止された文字が含まれています。';
+
?>
diff --git a/plugins/password/localization/ko_KR.inc b/plugins/password/localization/ko_KR.inc
index 21e2dbbf8..ec346ee00 100644
--- a/plugins/password/localization/ko_KR.inc
+++ b/plugins/password/localization/ko_KR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = '암호 변경';
$labels['curpasswd'] = '현재 암호:';
$labels['newpasswd'] = '새 암호:';
$labels['confpasswd'] = '새로운 비밀번호 확인 :';
+
+$messages = array();
$messages['nopassword'] = '새 암호를 입력하시오.';
$messages['nocurpassword'] = '현재 사용중인 암호를 입력하세요.';
$messages['passwordincorrect'] = '현재 사용중인 암호가 올바르지 않습니다.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = '새로운 암호를 저장할 수 없습니다.';
$messages['passwordshort'] = '암호는 적어도 $length 글자 이상이어야 합니다.';
$messages['passwordweak'] = '암호는 적어도 숫자 하나와 특수 문자 하나를 포함하여야 합니다.';
$messages['passwordforbidden'] = '암호가 허락되지 않은 문자들을 포함하고 있습니다.';
+
?>
diff --git a/plugins/password/localization/ku.inc b/plugins/password/localization/ku.inc
index 544626846..3bee221b6 100644
--- a/plugins/password/localization/ku.inc
+++ b/plugins/password/localization/ku.inc
@@ -15,5 +15,23 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'گۆڕینی ووشەی نهێنی';
+$labels['curpasswd'] = 'Current Password:';
+$labels['newpasswd'] = 'New Password:';
+$labels['confpasswd'] = 'Confirm New Password:';
+
+$messages = array();
+$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/lt_LT.inc b/plugins/password/localization/lt_LT.inc
index 4425d63e0..fe512960a 100644
--- a/plugins/password/localization/lt_LT.inc
+++ b/plugins/password/localization/lt_LT.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Slaptažodžio keitimas';
$labels['curpasswd'] = 'Dabartinis slaptažodis:';
$labels['newpasswd'] = 'Naujasis slaptažodis:';
$labels['confpasswd'] = 'Pakartokite naująjį slaptažodį:';
+
+$messages = array();
$messages['nopassword'] = 'Prašom įvesti naująjį slaptažodį.';
$messages['nocurpassword'] = 'Prašom įvesti dabartinį slaptažodį.';
$messages['passwordincorrect'] = 'Dabartinis slaptažodis neteisingas.';
@@ -29,4 +33,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ų.';
+
?>
diff --git a/plugins/password/localization/lv_LV.inc b/plugins/password/localization/lv_LV.inc
index c45bc8314..650d31b2c 100644
--- a/plugins/password/localization/lv_LV.inc
+++ b/plugins/password/localization/lv_LV.inc
@@ -15,18 +15,23 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Nomainīt paroli';
$labels['curpasswd'] = 'Pašreizējā parole:';
$labels['newpasswd'] = 'Jaunā parole:';
-$labels['confpasswd'] = 'Apstiprināt jauno paroli:';
-$messages['nopassword'] = 'Lūdzu ievadiet jauno paroli.';
-$messages['nocurpassword'] = 'Lūdzu ievadiet pašreizējo paroli.';
-$messages['passwordincorrect'] = 'Pašreizējā parole nav pareiza.';
+$labels['confpasswd'] = 'Vēlreiz jauno paroli:';
+
+$messages = array();
+$messages['nopassword'] = 'Lūdzu, ievadiet jauno paroli.';
+$messages['nocurpassword'] = 'Lūdzu, ievadiet pašreizējo paroli.';
+$messages['passwordincorrect'] = 'Pašreizējā parole nepareiza.';
$messages['passwordinconsistency'] = 'Paroles nesakrīt. Lūdzu, ievadiet vēlreiz.';
-$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcijas.';
+$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcija.';
$messages['connecterror'] = 'Nevarēja saglabāt jauno paroli. Savienojuma kļūda.';
$messages['internalerror'] = 'Nevarēja saglabāt jauno paroli.';
-$messages['passwordshort'] = 'Jaunajai parolei jābūt vismaz $length simbolu garai.';
-$messages['passwordweak'] = 'Jaunajai parolei jāsatur vismaz viens cipars un speciālais simbols.';
-$messages['passwordforbidden'] = 'Parole satur neatļautus simbolus.';
+$messages['passwordshort'] = 'Jaunajai parolei jābūt vismaz $length simbola garai.';
+$messages['passwordweak'] = 'Jaunajai parolei jāsatur vismaz viens cipars un punktuācijas simbols.';
+$messages['passwordforbidden'] = 'Password contains forbidden characters.';
+
?>
diff --git a/plugins/password/localization/nb_NO.inc b/plugins/password/localization/nb_NO.inc
index 9901303d2..6d8440bf3 100644
--- a/plugins/password/localization/nb_NO.inc
+++ b/plugins/password/localization/nb_NO.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Bytt passord';
$labels['curpasswd'] = 'Nåværende passord:';
$labels['newpasswd'] = 'Nytt passord:';
$labels['confpasswd'] = 'Bekreft nytt passord';
+
+$messages = array();
$messages['nopassword'] = 'Vennligst skriv inn nytt passord';
$messages['nocurpassword'] = 'Vennligst skriv inn nåværende passord';
$messages['passwordincorrect'] = 'Nåværende passord er feil.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Kunne ikke lagre nytt passord';
$messages['passwordshort'] = 'Passordet må minimum inneholde $length tegn.';
$messages['passwordweak'] = 'Passordet må inneholde minst ett tall og ett tegnsettingssymbol.';
$messages['passwordforbidden'] = 'Passordet inneholder forbudte tegn.';
+
?>
diff --git a/plugins/password/localization/nl_NL.inc b/plugins/password/localization/nl_NL.inc
index 1b5f0b15b..e5b634602 100644
--- a/plugins/password/localization/nl_NL.inc
+++ b/plugins/password/localization/nl_NL.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Wachtwoord wijzigen';
$labels['curpasswd'] = 'Huidig wachtwoord:';
$labels['newpasswd'] = 'Nieuw wachtwoord:';
$labels['confpasswd'] = 'Bevestig nieuw wachtwoord:';
+
+$messages = array();
$messages['nopassword'] = 'Vul uw nieuwe wachtwoord in.';
$messages['nocurpassword'] = 'Vul uw huidige wachtwoord in.';
$messages['passwordincorrect'] = 'Huidig wachtwoord is onjuist.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/nn_NO.inc b/plugins/password/localization/nn_NO.inc
index 89d0ad1c1..dc7c8f390 100644
--- a/plugins/password/localization/nn_NO.inc
+++ b/plugins/password/localization/nn_NO.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Bytt passord';
$labels['curpasswd'] = 'Noverande passord:';
$labels['newpasswd'] = 'Nytt passord:';
$labels['confpasswd'] = 'Bekreft nytt passord';
+
+$messages = array();
$messages['nopassword'] = 'Venlegast skriv inn nytt passord.';
$messages['nocurpassword'] = 'Venlegast skriv inn noverande passord.';
$messages['passwordincorrect'] = 'Noverande passord er feil.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Kunne ikkje lagre nytt passord.';
$messages['passwordshort'] = 'Passordet må minimum innehalde $length teikn.';
$messages['passwordweak'] = 'Passordet må innehalde minst eitt tal og eitt skilleteikn.';
$messages['passwordforbidden'] = 'Passordet inneheld forbodne teikn.';
+
?>
diff --git a/plugins/password/localization/pl_PL.inc b/plugins/password/localization/pl_PL.inc
index b3ce3726f..f4bce1792 100644
--- a/plugins/password/localization/pl_PL.inc
+++ b/plugins/password/localization/pl_PL.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Zmiana hasła';
$labels['curpasswd'] = 'Aktualne hasło:';
$labels['newpasswd'] = 'Nowe hasło:';
$labels['confpasswd'] = 'Potwierdź hasło:';
+
+$messages = array();
$messages['nopassword'] = 'Wprowadź nowe hasło.';
$messages['nocurpassword'] = 'Wprowadź aktualne hasło.';
$messages['passwordincorrect'] = 'Błędne aktualne hasło, spróbuj ponownie.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/pt_BR.inc b/plugins/password/localization/pt_BR.inc
index ac714764f..f6f6ced01 100644
--- a/plugins/password/localization/pt_BR.inc
+++ b/plugins/password/localization/pt_BR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Alterar senha';
$labels['curpasswd'] = 'Senha atual:';
$labels['newpasswd'] = 'Nova senha:';
$labels['confpasswd'] = 'Confirmar nova senha:';
+
+$messages = array();
$messages['nopassword'] = 'Por favor, informe a nova senha.';
$messages['nocurpassword'] = 'Por favor, informe a senha atual.';
$messages['passwordincorrect'] = 'Senha atual incorreta.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/pt_PT.inc b/plugins/password/localization/pt_PT.inc
index fc5b28899..faad112ea 100644
--- a/plugins/password/localization/pt_PT.inc
+++ b/plugins/password/localization/pt_PT.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Alterar password';
$labels['curpasswd'] = 'Password atual:';
$labels['newpasswd'] = 'Nova password:';
$labels['confpasswd'] = 'Confirmar password:';
+
+$messages = array();
$messages['nopassword'] = 'Introduza a nova password.';
$messages['nocurpassword'] = 'Introduza a password actual.';
$messages['passwordincorrect'] = 'Password actual errada.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Não foi possível gravar a nova password.';
$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.';
+
?>
diff --git a/plugins/password/localization/ro_RO.inc b/plugins/password/localization/ro_RO.inc
index 004254382..17ec31c6b 100644
--- a/plugins/password/localization/ro_RO.inc
+++ b/plugins/password/localization/ro_RO.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Schimbați parola';
$labels['curpasswd'] = 'Parola curentă:';
$labels['newpasswd'] = 'Parola nouă:';
$labels['confpasswd'] = 'Confirmare parola nouă:';
+
+$messages = array();
$messages['nopassword'] = 'Te rog să introduci noua parolă.';
$messages['nocurpassword'] = 'Te rog să introduci parola curentă';
$messages['passwordincorrect'] = 'Parola curentă este incorectă.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/ru_RU.inc b/plugins/password/localization/ru_RU.inc
index 85b7bf2c4..79fbfedf6 100644
--- a/plugins/password/localization/ru_RU.inc
+++ b/plugins/password/localization/ru_RU.inc
@@ -15,18 +15,23 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Изменить пароль';
$labels['curpasswd'] = 'Текущий пароль:';
$labels['newpasswd'] = 'Новый пароль:';
$labels['confpasswd'] = 'Подтвердите новый пароль:';
+
+$messages = array();
$messages['nopassword'] = 'Пожалуйста, введите новый пароль.';
$messages['nocurpassword'] = 'Пожалуйста, введите текущий пароль.';
$messages['passwordincorrect'] = 'Текущий пароль неверен.';
-$messages['passwordinconsistency'] = 'Пароли не совпадают, попробуйте ещё раз, пожалуйста.';
+$messages['passwordinconsistency'] = 'Пароли не совпадают, попробуйте, пожалуйста, ещё.';
$messages['crypterror'] = 'Не могу сохранить новый пароль. Отсутствует криптографическая функция.';
$messages['connecterror'] = 'Не могу сохранить новый пароль. Ошибка соединения.';
$messages['internalerror'] = 'Не могу сохранить новый пароль.';
-$messages['passwordshort'] = 'Длина пароля должна быть как минимум $length символов.';
+$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..4098cb685 100644
--- a/plugins/password/localization/sk_SK.inc
+++ b/plugins/password/localization/sk_SK.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Zmeniť heslo';
$labels['curpasswd'] = 'Súčasné heslo:';
$labels['newpasswd'] = 'Nové heslo:';
$labels['confpasswd'] = 'Potvrď nové heslo:';
+
+$messages = array();
$messages['nopassword'] = 'Prosím zadaj nové heslo.';
$messages['nocurpassword'] = 'Prosím zadaj súčasné heslo.';
$messages['passwordincorrect'] = 'Súčasné heslo je nesprávne.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Nemôžem uložiť nové heslo.';
$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/localization/sl_SI.inc b/plugins/password/localization/sl_SI.inc
index 99af3c9f5..27a094219 100644
--- a/plugins/password/localization/sl_SI.inc
+++ b/plugins/password/localization/sl_SI.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Spremeni geslo';
$labels['curpasswd'] = 'Obstoječe geslo:';
$labels['newpasswd'] = 'Novo geslo:';
$labels['confpasswd'] = 'Potrdi novo geslo:';
+
+$messages = array();
$messages['nopassword'] = 'Vnesite novo geslo.';
$messages['nocurpassword'] = 'Vnesite obstoječe geslo.';
$messages['passwordincorrect'] = 'Obstoječe geslo ni veljavno.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Novega gesla ni bilo mogoče shraniti.';
$messages['passwordshort'] = 'Geslo mora vsebovati vsaj $length znakov';
$messages['passwordweak'] = 'Geslo mora vključevati vsaj eno številko in ločilo.';
$messages['passwordforbidden'] = 'Geslo vsebuje neveljavne znake.';
+
?>
diff --git a/plugins/password/localization/sr_CS.inc b/plugins/password/localization/sr_CS.inc
index 0900b3112..18361032d 100644
--- a/plugins/password/localization/sr_CS.inc
+++ b/plugins/password/localization/sr_CS.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Промијени лозинку';
$labels['curpasswd'] = 'Тренутна лозинка:';
$labels['newpasswd'] = 'Нова лозинка:';
$labels['confpasswd'] = 'Поновите лозинку:';
+
+$messages = array();
$messages['nopassword'] = 'Молимо унесите нову лозинку.';
$messages['nocurpassword'] = 'Молимо унесите тренутну лозинку.';
$messages['passwordincorrect'] = 'Тренутна лозинка је нетачна.';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Није могуће сачувати нову л
$messages['passwordshort'] = 'Лозинка мора имати најмање $lenght знакова.';
$messages['passwordweak'] = 'Лозинка мора да садржи најмање један број и један интерпункцијски знак.';
$messages['passwordforbidden'] = 'Лозинка садржи недозвољене знакове.';
+
?>
diff --git a/plugins/password/localization/sv_SE.inc b/plugins/password/localization/sv_SE.inc
index 0aee9da81..90f7b9f58 100644
--- a/plugins/password/localization/sv_SE.inc
+++ b/plugins/password/localization/sv_SE.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Ändra lösenord';
$labels['curpasswd'] = 'Nuvarande lösenord:';
$labels['newpasswd'] = 'Nytt lösenord:';
$labels['confpasswd'] = 'Bekräfta nytt lösenord:';
+
+$messages = array();
$messages['nopassword'] = 'Ange nytt lösenord.';
$messages['nocurpassword'] = 'Ange nuvarande lösenord.';
$messages['passwordincorrect'] = 'Felaktigt nuvarande lösenord.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/tr_TR.inc b/plugins/password/localization/tr_TR.inc
index 75ee30f6d..99133a158 100644
--- a/plugins/password/localization/tr_TR.inc
+++ b/plugins/password/localization/tr_TR.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = 'Parolayı Değiştir';
$labels['curpasswd'] = 'Şimdiki Parola:';
$labels['newpasswd'] = 'Yeni Parola:';
$labels['confpasswd'] = 'Yeni Parolayı Onaylayın:';
+
+$messages = array();
$messages['nopassword'] = 'Lütfen yeni parolayı girin.';
$messages['nocurpassword'] = 'Lütfen şimdiki parolayı girin.';
$messages['passwordincorrect'] = 'Şimdiki parolayı yanlış girdiniz.';
@@ -29,4 +33,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.';
+
?>
diff --git a/plugins/password/localization/vi_VN.inc b/plugins/password/localization/vi_VN.inc
index 3e5745f4d..f21d65156 100644
--- a/plugins/password/localization/vi_VN.inc
+++ b/plugins/password/localization/vi_VN.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$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';
+
+$messages = array();
$messages['nopassword'] = 'Mời nhập mật khẩu mới';
$messages['nocurpassword'] = 'Mời nhập mật khẩu hiện tại';
$messages['passwordincorrect'] = 'Mật khẩu hiện thời không đúng';
@@ -29,4 +33,5 @@ $messages['internalerror'] = 'Không thể lưu mật khẩu mới';
$messages['passwordshort'] = 'Mật khẩu phải dài ít nhất $ ký tự';
$messages['passwordweak'] = 'Mật khẩu phải bao gồm ít nhất 1 con số và 1 ký tự dấu câu';
$messages['passwordforbidden'] = 'Mật khẩu bao gồm ký tự không hợp lệ';
+
?>
diff --git a/plugins/password/localization/zh_CN.inc b/plugins/password/localization/zh_CN.inc
index 02db6e83e..5d14926f2 100644
--- a/plugins/password/localization/zh_CN.inc
+++ b/plugins/password/localization/zh_CN.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = '修改密码';
$labels['curpasswd'] = '当前密码:';
$labels['newpasswd'] = '新密码:';
$labels['confpasswd'] = '确认新密码:';
+
+$messages = array();
$messages['nopassword'] = '请输入新密码。';
$messages['nocurpassword'] = '请输入当前的密码。';
$messages['passwordincorrect'] = '当前密码不正确。';
@@ -29,4 +33,5 @@ $messages['internalerror'] = '无法保存新密码。';
$messages['passwordshort'] = '密码至少为 $length 位。';
$messages['passwordweak'] = '密码必须至少包含一个数字和一个标点符号。';
$messages['passwordforbidden'] = '密码包含禁止使用的字符。';
+
?>
diff --git a/plugins/password/localization/zh_TW.inc b/plugins/password/localization/zh_TW.inc
index e5e2414f2..b61e113c8 100644
--- a/plugins/password/localization/zh_TW.inc
+++ b/plugins/password/localization/zh_TW.inc
@@ -15,10 +15,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
+
+$labels = array();
$labels['changepasswd'] = '更改密碼';
$labels['curpasswd'] = '目前的密碼';
$labels['newpasswd'] = '新密碼';
$labels['confpasswd'] = '確認新密碼';
+
+$messages = array();
$messages['nopassword'] = '請輸入新密碼';
$messages['nocurpassword'] = '請輸入目前的密碼';
$messages['passwordincorrect'] = '目前的密碼錯誤';
@@ -29,4 +33,5 @@ $messages['internalerror'] = '無法更新密碼';
$messages['passwordshort'] = '您的密碼至少需 $length 個字元長';
$messages['passwordweak'] = '您的新密碼至少需含有一個數字與一個標點符號';
$messages['passwordforbidden'] = '您的密碼含有禁用字元';
+
?>
diff --git a/plugins/password/package.xml b/plugins/password/package.xml
index 16eda1ad0..9a056dec6 100644
--- a/plugins/password/package.xml
+++ b/plugins/password/package.xml
@@ -15,18 +15,19 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-04-28</date>
+ <date>2012-11-15</date>
<version>
- <release>3.4</release>
+ <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.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>
-Added password_force_save option
+- 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>
<contents>
<dir baseinstalldir="/" name="/">
@@ -346,36 +347,5 @@ Added password_force_save option
- 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 12c9074ff..a060fc334 100644
--- a/plugins/password/password.js
+++ b/plugins/password/password.js
@@ -5,8 +5,13 @@
if (window.rcmail) {
rcmail.addEventListener('init', function(evt) {
+ // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
+ var tab = $('<span>').attr('id', 'settingstabpluginpassword').addClass('tablink password');
+ var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.password')
+ .html(rcmail.gettext('password')).appendTo(tab);
- // register command handler
+ // add button and register commands
+ rcmail.add_element(tab, 'tabs');
rcmail.register_command('plugin.password-save', function() {
var input_curpasswd = rcube_find_object('_curpasswd');
var input_newpasswd = rcube_find_object('_newpasswd');
diff --git a/plugins/password/password.php b/plugins/password/password.php
index e31613ab1..806db0586 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -1,26 +1,32 @@
<?php
-/**
- * Password Plugin for Roundcube
- *
- * @version @package_version@
- * @author Aleksander Machniak <alec@alec.pl>
- *
- * Copyright (C) 2005-2013, The Roundcube Dev Team
- *
- * This program 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- */
+/*
+ +-------------------------------------------------------------------------+
+ | Password Plugin for Roundcube |
+ | @version @package_version@ |
+ | |
+ | Copyright (C) 2009-2010, Roundcube Dev. |
+ | |
+ | This program is free software; you can redistribute it and/or modify |
+ | it under the terms of the GNU General Public License version 2 |
+ | as published by the Free Software Foundation. |
+ | |
+ | This program is distributed in the hope that it will be useful, |
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+ | GNU General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU General Public License along |
+ | with this program; if not, write to the Free Software Foundation, Inc., |
+ | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
+ | |
+ +-------------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-------------------------------------------------------------------------+
+
+ $Id: index.php 2645 2009-06-15 07:01:36Z alec $
+
+*/
define('PASSWORD_CRYPT_ERROR', 1);
define('PASSWORD_ERROR', 2);
@@ -69,19 +75,13 @@ class password extends rcube_plugin
}
}
- $this->add_hook('settings_actions', array($this, 'settings_actions'));
+ // add Tab label
+ $rcmail->output->add_label('password');
$this->register_action('plugin.password', array($this, 'password_init'));
$this->register_action('plugin.password-save', array($this, 'password_save'));
$this->include_script('password.js');
}
- function settings_actions($args)
- {
- // register as settings action
- $args['actions'][] = array('action' => 'plugin.password', 'class' => 'password', 'label' => 'password', 'domain' => 'password');
- return $args;
- }
-
function password_init()
{
$this->add_texts('localization/');
@@ -112,22 +112,22 @@ class password extends rcube_plugin
$rc_charset = strtoupper($rcmail->output->get_charset());
$sespwd = $rcmail->decrypt($_SESSION['password']);
- $curpwd = $confirm ? rcube_utils::get_input_value('_curpasswd', rcube_utils::INPUT_POST, true, $charset) : $sespwd;
- $newpwd = rcube_utils::get_input_value('_newpasswd', rcube_utils::INPUT_POST, true);
- $conpwd = rcube_utils::get_input_value('_confpasswd', rcube_utils::INPUT_POST, true);
+ $curpwd = $confirm ? get_input_value('_curpasswd', RCUBE_INPUT_POST, true, $charset) : $sespwd;
+ $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST, true);
+ $conpwd = get_input_value('_confpasswd', RCUBE_INPUT_POST, true);
// check allowed characters according to the configured 'password_charset' option
// by converting the password entered by the user to this charset and back to UTF-8
$orig_pwd = $newpwd;
- $chk_pwd = rcube_charset::convert($orig_pwd, $rc_charset, $charset);
- $chk_pwd = rcube_charset::convert($chk_pwd, $charset, $rc_charset);
+ $chk_pwd = rcube_charset_convert($orig_pwd, $rc_charset, $charset);
+ $chk_pwd = rcube_charset_convert($chk_pwd, $charset, $rc_charset);
// WARNING: Default password_charset is ISO-8859-1, so conversion will
// change national characters. This may disable possibility of using
// the same password in other MUA's.
// We're doing this for consistence with Roundcube core
- $newpwd = rcube_charset::convert($newpwd, $rc_charset, $charset);
- $conpwd = rcube_charset::convert($conpwd, $rc_charset, $charset);
+ $newpwd = rcube_charset_convert($newpwd, $rc_charset, $charset);
+ $conpwd = rcube_charset_convert($conpwd, $rc_charset, $charset);
if ($chk_pwd != $orig_pwd) {
$rcmail->output->command('display_message', $this->gettext('passwordforbidden'), 'error');
@@ -141,13 +141,13 @@ class password extends rcube_plugin
}
else if ($required_length && strlen($newpwd) < $required_length) {
$rcmail->output->command('display_message', $this->gettext(
- array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
+ array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
}
else if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
$rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
}
// password is the same as the old one, do nothing, return success
- else if ($sespwd == $newpwd && !$rcmail->config->get('password_force_save')) {
+ else if ($sespwd == $newpwd) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
}
// try to save the password
@@ -163,8 +163,8 @@ class password extends rcube_plugin
// Log password change
if ($rcmail->config->get('password_log')) {
- rcube::write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
- $rcmail->get_user_name(), $rcmail->user->ID, rcube_utils::remote_ip()));
+ write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
+ $rcmail->get_user_name(), $rcmail->user->ID, rcmail_remote_ip()));
}
}
else {
@@ -172,7 +172,7 @@ class password extends rcube_plugin
}
}
- $rcmail->overwrite_action('plugin.password');
+ rcmail_overwrite_action('plugin.password');
$rcmail->output->send('plugin');
}
@@ -197,7 +197,7 @@ class password extends rcube_plugin
$input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('curpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('curpasswd'))));
$table->add(null, $input_curpasswd->show());
}
@@ -206,7 +206,7 @@ class password extends rcube_plugin
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('newpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show confirm password selection
@@ -214,7 +214,7 @@ class password extends rcube_plugin
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$out = html::div(array('class' => 'box'),
@@ -246,7 +246,7 @@ class password extends rcube_plugin
$file = $this->home . "/drivers/$driver.php";
if (!file_exists($file)) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -258,7 +258,7 @@ class password extends rcube_plugin
include_once $file;
if (!class_exists($class, false) || !method_exists($class, 'save')) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,