summaryrefslogtreecommitdiff
path: root/plugins/password/password.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-11-17 16:24:09 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-11-17 16:24:09 +0100
commit6ddb16d181e285d4f0ef0ef55bdd0ba787f1b583 (patch)
tree5f186f89d5d7f77592acf3aec676b48367a96d48 /plugins/password/password.php
parentbc66f7d6d208ac99dcec57992c4eb955570d85bc (diff)
parent9ab34604d94270f6c1795c7dd7b615273d05db0c (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'plugins/password/password.php')
-rw-r--r--plugins/password/password.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 58b6f8cd9..028a58d3e 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. |
| |
@@ -56,7 +56,13 @@ class password extends rcube_plugin
$this->load_config();
- // Exceptions list
+ // Host exceptions
+ $hosts = $rcmail->config->get('password_hosts');
+ if (!empty($hosts) && !in_array($_SESSION['storage_host'], $hosts)) {
+ return;
+ }
+
+ // Login exceptions
if ($exceptions = $rcmail->config->get('password_login_exceptions')) {
$exceptions = array_map('trim', (array) $exceptions);
$exceptions = array_filter($exceptions);
@@ -274,8 +280,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');