restrict url cache to 254 maxlen

This commit is contained in:
redmatrix 2016-07-26 20:05:40 -07:00
parent 80e4338314
commit 315dafbe12

View File

@ -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)
);