summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-02-27 13:59:05 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-02-27 13:59:05 (GMT)
commit16d0e127a1e9fb8399c841aad315466bff3d5a3a (patch)
tree1bc26c9d2f3e89bf4997912932222ef3a0f97738
parent97e4b2c4f8513f4ac73791093c45036f4dbcc636 (diff)
downloadiRony-16d0e127a1e9fb8399c841aad315466bff3d5a3a.tar.gz
Add host name to the cache key
-rw-r--r--lib/Kolab/DAV/Auth/HTTPBasic.php5
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,
));