aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-08-12 14:07:16 +0200
committerMario Vavti <mario@mariovavti.com>2018-08-12 14:07:16 +0200
commit759a18685b75e631d5884d610cc3a6fe483b821d (patch)
tree1a1dd9585e506b91d3a49c06480b51ebe20dbf71 /include
parente07ab65d73b690184578f5a530b236078616509f (diff)
parent5afe779ffc69bc5889a83a6fcbc4bcefc7c40a5c (diff)
downloadvolse-hubzilla-759a18685b75e631d5884d610cc3a6fe483b821d.tar.gz
volse-hubzilla-759a18685b75e631d5884d610cc3a6fe483b821d.tar.bz2
volse-hubzilla-759a18685b75e631d5884d610cc3a6fe483b821d.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r--include/network.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/network.php b/include/network.php
index 6961bf0ba..d4f4f27c6 100644
--- a/include/network.php
+++ b/include/network.php
@@ -2042,6 +2042,22 @@ function jsonld_document_loader($url) {
require_once('library/jsonld/jsonld.php');
+ $recursion = 0;
+
+ $x = debug_backtrace();
+ if($x) {
+ foreach($x as $n) {
+ if($n['function'] === __FUNCTION__) {
+ $recursion ++;
+ }
+ }
+ }
+ if($recursion > 5) {
+ logger('jsonld bomb detected at: ' . $url);
+ killme();
+ }
+
+
$cachepath = 'store/[data]/ldcache';
if(! is_dir($cachepath))
os_mkdir($cachepath, STORAGE_DEFAULT_PERMISSIONS, true);