From b011a3c68940d4228a5af3a231536d5d45e957a6 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 25 Nov 2010 21:30:41 +0100 Subject: [PATCH] Fix inconsistent cache keys (Bug #9392). --- framework/Perms/lib/Horde/Perms/Sql.php | 8 ++++---- horde/docs/CHANGES | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/framework/Perms/lib/Horde/Perms/Sql.php b/framework/Perms/lib/Horde/Perms/Sql.php index 165ca907e..7b1f511b3 100644 --- a/framework/Perms/lib/Horde/Perms/Sql.php +++ b/framework/Perms/lib/Horde/Perms/Sql.php @@ -116,7 +116,7 @@ class Horde_Perms_Sql extends Horde_Perms return $this->_permsCache[$name]; } - $perm = $this->_cache->get('perm_sql' . $this->_cacheVersion . $name, $GLOBALS['conf']['cache']['default_lifetime']); + $perm = $this->_cache->get('perm_sql_' . $this->_cacheVersion . $name, $GLOBALS['conf']['cache']['default_lifetime']); if (empty($perm)) { $query = 'SELECT perm_id, perm_data FROM ' . $this->_params['table'] . ' WHERE perm_name = ?'; @@ -135,7 +135,7 @@ class Horde_Perms_Sql extends Horde_Perms $object->setId($result['perm_id']); $object->setData(unserialize($result['perm_data'])); - $this->_cache->set('perm_sql' . $this->_cacheVersion . $name, serialize($object)); + $this->_cache->set('perm_sql_' . $this->_cacheVersion . $name, serialize($object)); $this->_permsCache[$name] = $object; } else { @@ -200,7 +200,7 @@ class Horde_Perms_Sql extends Horde_Perms throw new Horde_Perms_Exception('Permission name must be non-empty.'); } - $this->_cache->expire('perm_sql' . $this->_cacheVersion . $name); + $this->_cache->expire('perm_sql_' . $this->_cacheVersion . $name); $this->_cache->expire('perm_sql_exists_' . $this->_cacheVersion . $name); // remove root from the name @@ -251,7 +251,7 @@ class Horde_Perms_Sql extends Horde_Perms $force = false) { $name = $perm->getName(); - $this->_cache->expire('perm_sql' . $this->_cacheVersion . $name); + $this->_cache->expire('perm_sql_' . $this->_cacheVersion . $name); $this->_cache->expire('perm_sql_exists_' . $this->_cacheVersion . $name); $query = 'DELETE FROM ' . $this->_params['table'] . diff --git a/horde/docs/CHANGES b/horde/docs/CHANGES index ef1b8fe76..a90fc7a27 100644 --- a/horde/docs/CHANGES +++ b/horde/docs/CHANGES @@ -54,9 +54,16 @@ v4.0-cvs ----------- -v3.3.11-cvs +v3.3.12-cvs ----------- +[jan] Fix invalidating permission cache in SQL driver (Bug #9392). + + +------- +v3.3.11 +------- + [mms] SECURITY: Fix XSS when viewing details of a vCard. [jan] Fix exporting recurrence exceptions to vCalendar 1.0. [jan] Skip event status synchronization with Outlook, which is broken. -- 2.11.0