diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Cache.php | 5 | ||||
-rw-r--r-- | Zotlabs/Web/Router.php | 1 | ||||
-rw-r--r-- | Zotlabs/Web/WebServer.php | 2 |
3 files changed, 7 insertions, 1 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) ); diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php index f9290ac30..4ba2a450d 100644 --- a/Zotlabs/Web/Router.php +++ b/Zotlabs/Web/Router.php @@ -152,6 +152,7 @@ class Router { // pretend this is a module so it will initialise the theme \App::$module = '404'; \App::$module_loaded = true; + \App::$error = true; } } } diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php index d4f3cb9ea..5bb0e08e8 100644 --- a/Zotlabs/Web/WebServer.php +++ b/Zotlabs/Web/WebServer.php @@ -124,7 +124,7 @@ class WebServer { // now that we've been through the module content, see if the page reported // a permission problem and if so, a 403 response would seem to be in order. - if(stristr(implode("", $_SESSION['sysmsg']), t('Permission denied'))) { + if(is_array($_SESSION['sysmsg']) && stristr(implode("", $_SESSION['sysmsg']), t('Permission denied'))) { header($_SERVER['SERVER_PROTOCOL'] . ' 403 ' . t('Permission denied.')); } |