From 32395bde1ad0adbcd49e01ee4f96bf9aec56dd7a Mon Sep 17 00:00:00 2001 From: NETLINK Date: Fri, 9 Nov 2012 04:46:07 +0000 Subject: Update plugins/password/config.inc.php.dist Added config option to specify hosts that support password changing. --- plugins/password/config.inc.php.dist | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins') diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index 8d7b433af..db5c47b02 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -1,5 +1,14 @@ Date: Fri, 9 Nov 2012 05:00:22 +0000 Subject: Update plugins/password/password.php Add logic for checking supported IMAP hosts Make use of additional config option 'password_supported_hosts' (see config.inc.php.dist). If current IMAP host is not in array of defined hosts, exit and suppress Password option in Settings. --- plugins/password/password.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/password/password.php b/plugins/password/password.php index 58b6f8cd9..bf7a95f69 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -55,6 +55,12 @@ class password extends rcube_plugin $rcmail = rcmail::get_instance(); $this->load_config(); + + $host = isset( $_SESSION['imap_host'] ) ? $_SESSION['imap_host'] : NULL; + $hosts = $rcmail->config->get( 'password_supported_hosts' ); + if ( !empty( $hosts ) and !in_array( $host, $hosts ) { + return; + } // Exceptions list if ($exceptions = $rcmail->config->get('password_login_exceptions')) { -- cgit v1.2.3 From 204e1e03e9cd6a9007e4fc7ff4202b09dc9ea2b2 Mon Sep 17 00:00:00 2001 From: NETLINK Date: Fri, 9 Nov 2012 05:13:22 +0000 Subject: Update plugins/password/password.php --- plugins/password/password.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/password/password.php b/plugins/password/password.php index bf7a95f69..320d5d037 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -3,7 +3,7 @@ /* +-------------------------------------------------------------------------+ | Password Plugin for Roundcube | - | @version @package_version@ | + | @version @package_version@ | | | | Copyright (C) 2009-2010, Roundcube Dev. | | | @@ -58,7 +58,7 @@ class password extends rcube_plugin $host = isset( $_SESSION['imap_host'] ) ? $_SESSION['imap_host'] : NULL; $hosts = $rcmail->config->get( 'password_supported_hosts' ); - if ( !empty( $hosts ) and !in_array( $host, $hosts ) { + if ( !empty( $hosts ) and !in_array( $host, $hosts ) ) { return; } -- cgit v1.2.3 From 3067458acbff330d144bddd779492d9b247b04b4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 15 Nov 2012 08:18:48 +0100 Subject: Fix wrong (non-specific) error message on crypt or connection error (#1488808) --- plugins/password/package.xml | 33 ++++++++++++++++++++++++--------- plugins/password/password.php | 2 ++ 2 files changed, 26 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/password/package.xml b/plugins/password/package.xml index 29d222409..e639a04ef 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -15,9 +15,9 @@ alec@alec.pl yes - 2012-03-07 + 2012-11-15 - 3.1 + 3.2 2.0 @@ -26,13 +26,7 @@ GNU GPLv2 -- Added pw_usermod driver (#1487826) -- Added option password_login_exceptions (#1487826) -- Added domainfactory driver (#1487882) -- Added DBMail driver (#1488281) -- Helper files moved to helpers/ directory from drivers/ -- Added Expect driver (#1488363) -- Added Samba password (#1488364) +- Fix wrong (non-specific) error message on crypt or connection error (#1488808) @@ -331,5 +325,26 @@ - Fixed drivers namespace issues + + 2012-03-07 + + 3.1 + 2.0 + + + stable + stable + + GNU GPLv2 + +- Added pw_usermod driver (#1487826) +- Added option password_login_exceptions (#1487826) +- Added domainfactory driver (#1487882) +- Added DBMail driver (#1488281) +- Helper files moved to helpers/ directory from drivers/ +- Added Expect driver (#1488363) +- Added Samba password (#1488364) + + diff --git a/plugins/password/password.php b/plugins/password/password.php index 58b6f8cd9..e795d115f 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -274,8 +274,10 @@ class password extends rcube_plugin return; case PASSWORD_CRYPT_ERROR; $reason = $this->gettext('crypterror'); + break; case PASSWORD_CONNECT_ERROR; $reason = $this->gettext('connecterror'); + break; case PASSWORD_ERROR: default: $reason = $this->gettext('internalerror'); -- cgit v1.2.3 From 98128f13fcdc8dca6ebefcdc93dc94b00322abb5 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 16 Nov 2012 19:49:02 +0100 Subject: Rename option password_supported_hosts to password_hosts, code cleanup --- plugins/password/config.inc.php.dist | 15 ++++++--------- plugins/password/package.xml | 1 + plugins/password/password.php | 10 +++++----- 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'plugins') diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index db5c47b02..e960bbe00 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -1,14 +1,5 @@ GNU GPLv2 - Fix wrong (non-specific) error message on crypt or connection error (#1488808) +- Added option to define IMAP hosts that support password changes - password_hosts diff --git a/plugins/password/password.php b/plugins/password/password.php index cd0f5f1e0..028a58d3e 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -55,14 +55,14 @@ class password extends rcube_plugin $rcmail = rcmail::get_instance(); $this->load_config(); - - $host = isset( $_SESSION['imap_host'] ) ? $_SESSION['imap_host'] : NULL; - $hosts = $rcmail->config->get( 'password_supported_hosts' ); - if ( !empty( $hosts ) and !in_array( $host, $hosts ) ) { + + // Host exceptions + $hosts = $rcmail->config->get('password_hosts'); + if (!empty($hosts) && !in_array($_SESSION['storage_host'], $hosts)) { return; } - // Exceptions list + // Login exceptions if ($exceptions = $rcmail->config->get('password_login_exceptions')) { $exceptions = array_map('trim', (array) $exceptions); $exceptions = array_filter($exceptions); -- cgit v1.2.3