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 14:00:11 (GMT)
commit8dce3dc4223b4803836efd6bb15ae083cee5e152 (patch)
tree803d621d3a9eb3d1f802a57448fa279931ec1e3a
parent002854d22efda6d6f6bdae2f06078f3109a19516 (diff)
downloadiRony-8dce3dc4223b4803836efd6bb15ae083cee5e152.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,
));