6.0.0-git
2021-01-18

[#9392] sql based permissions cache expire bug with save
Summary sql based permissions cache expire bug with save
Queue Horde Base
Queue Version 3.3.10
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester vamos (at) netikka (dot) fi
Created 2010-11-16 (3716 days ago)
Due
Updated 2010-11-25 (3707 days ago)
Assigned
Resolved 2010-11-25 (3707 days ago)
Milestone 3.3.12
Patch Yes

History
2010-11-25 20:12:23 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.3.12
 
2010-11-16 10:16:30 vamos (at) netikka (dot) fi Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ sql based permissions cache expire bug with save
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
Reply to this comment
When using SQL based permissions and cache, the SQLObject_Permission 
class save method is incorrectly expiring wrong cache entry 
$cache->expire('perm_sql_' . $name):


# diff -u horde-3.3.10/lib/Horde/Perms/sql.php 
horde-3.3.10-new/lib/Horde/Perms/sql.php
--- horde-3.3.10/lib/Horde/Perms/sql.php        2010-10-25 
15:58:55.000000000 +0300
+++ horde-3.3.10-new/lib/Horde/Perms/sql.php    2010-11-16 
12:05:41.000000000 +0200
@@ -524,7 +524,7 @@
          }

          $cache = 
Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], 
Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver']));
-        $cache->expire('perm_sql_' . $name);
+        $cache->expire('perm_sql' . $name);
          $cache->expire('perm_sql_exists_' . $name);

          return true;

Saved Queries