From 315dafbe122829aedd80ede1db99d3e4e380dbf8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 26 Jul 2016 20:05:40 -0700 Subject: restrict url cache to 254 maxlen --- Zotlabs/Lib/Cache.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Cache.php b/Zotlabs/Lib/Cache.php index 35c8f56ad..f211269be 100644 --- a/Zotlabs/Lib/Cache.php +++ b/Zotlabs/Lib/Cache.php @@ -8,6 +8,9 @@ namespace Zotlabs\Lib; class Cache { public static function get($key) { + + $key = substr($key,0,254); + $r = q("SELECT v FROM cache WHERE k = '%s' limit 1", dbesc($key) ); @@ -19,6 +22,8 @@ class Cache { public static function set($key,$value) { + $key = substr($key,0,254); + $r = q("SELECT * FROM cache WHERE k = '%s' limit 1", dbesc($key) ); -- cgit v1.2.3