lib/kolab_sync.php

Aleksander Machniak machniak at kolabsys.com
Thu Feb 27 15:02:41 CET 2014


 lib/kolab_sync.php |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8d075386f19f555c8007709f28c3c2767e8b20fe
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Thu Feb 27 15:02:16 2014 +0100

    Add host name to the cache key

diff --git a/lib/kolab_sync.php b/lib/kolab_sync.php
index fba0eb2..1870996 100644
--- a/lib/kolab_sync.php
+++ b/lib/kolab_sync.php
@@ -173,12 +173,13 @@ class kolab_sync extends rcube
     public function authenticate($username, $password)
     {
         // use shared cache for kolab_auth plugin result (username canonification)
-        $cache = $this->get_cache_shared('activesync_auth');
-        $cache_key = sha1($username);
+        $cache     = $this->get_cache_shared('activesync_auth');
+        $host      = $this->select_host($username);
+        $cache_key = sha1($username . '::' . $host);
 
         if (!$cache || !($auth = $cache->get($cache_key))) {
             $auth = $this->plugins->exec_hook('authenticate', array(
-                'host'  => $this->select_host($username),
+                'host'  => $host,
                 'user'  => $username,
                 'pass'  => $password,
             ));




More information about the commits mailing list