summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
authorNETLINK <julianmatz@netlink.ie>2012-11-09 05:00:22 +0000
committerNETLINK <julianmatz@netlink.ie>2012-11-09 05:00:22 +0000
commit7978f872cbd154b169fc9395a3103031f056cf29 (patch)
treee6a629248f88d367c2eece9df36b942eb88de7ee /plugins/password
parent32395bde1ad0adbcd49e01ee4f96bf9aec56dd7a (diff)
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.
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/password.php6
1 files changed, 6 insertions, 0 deletions
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')) {