diff options
author | redmatrix <git@macgirvin.com> | 2016-07-26 20:05:40 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-26 20:05:40 -0700 |
commit | 315dafbe122829aedd80ede1db99d3e4e380dbf8 (patch) | |
tree | f315204620cd426385ded4229713c40931f81ae6 | |
parent | 80e433831430e9edc3829d2760551e03643cc598 (diff) | |
download | volse-hubzilla-315dafbe122829aedd80ede1db99d3e4e380dbf8.tar.gz volse-hubzilla-315dafbe122829aedd80ede1db99d3e4e380dbf8.tar.bz2 volse-hubzilla-315dafbe122829aedd80ede1db99d3e4e380dbf8.zip |
restrict url cache to 254 maxlen
-rw-r--r-- | Zotlabs/Lib/Cache.php | 5 |
1 files changed, 5 insertions, 0 deletions
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) ); |