aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-26 20:05:40 -0700
committerredmatrix <git@macgirvin.com>2016-07-26 20:05:40 -0700
commit315dafbe122829aedd80ede1db99d3e4e380dbf8 (patch)
treef315204620cd426385ded4229713c40931f81ae6
parent80e433831430e9edc3829d2760551e03643cc598 (diff)
downloadvolse-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.php5
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)
);