diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2014-02-27 13:59:05 (GMT) |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2014-02-27 14:00:11 (GMT) |
commit | 8dce3dc4223b4803836efd6bb15ae083cee5e152 (patch) | |
tree | 803d621d3a9eb3d1f802a57448fa279931ec1e3a | |
parent | 002854d22efda6d6f6bdae2f06078f3109a19516 (diff) | |
download | iRony-8dce3dc4223b4803836efd6bb15ae083cee5e152.tar.gz |
Add host name to the cache key
-rw-r--r-- | lib/Kolab/DAV/Auth/HTTPBasic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Kolab/DAV/Auth/HTTPBasic.php b/lib/Kolab/DAV/Auth/HTTPBasic.php index 4e0e54e..f152cc8 100644 --- a/lib/Kolab/DAV/Auth/HTTPBasic.php +++ b/lib/Kolab/DAV/Auth/HTTPBasic.php @@ -51,14 +51,15 @@ class HTTPBasic extends DAV\Auth\Backend\AbstractBasic protected function validateUserPass($username, $password) { $rcube = rcube::get_instance(); + $host = $this->_select_host($username); // use shared cache for kolab_auth plugin result (username canonification) $cache = $rcube->get_cache_shared('kolabdav_auth'); - $cache_key = sha1($username); + $cache_key = sha1($username . '::' . $host); if (!$cache || !($auth = $cache->get($cache_key))) { $auth = $rcube->plugins->exec_hook('authenticate', array( - 'host' => $this->_select_host($username), + 'host' => $host, 'user' => $username, 'pass' => $password, )); |