aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-11-09 09:10:19 +0000
committerMario <mario@mariovavti.com>2021-11-09 09:10:19 +0000
commitfe7ecede700fe04631d23f36473e697ce2b364dc (patch)
treee713fc39dba500a25cb2acf8561e286fb8b41ff0 /include/network.php
parent42de18d96d201d74e5df3ed1b8f6132cb00357b6 (diff)
parent089708ab9f90309a0c27ae633cf8f2604fce1170 (diff)
downloadvolse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.gz
volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.bz2
volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.zip
Merge branch '6.4RC'6.4
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index 194b50885..1b8f0e663 100644
--- a/include/network.php
+++ b/include/network.php
@@ -2014,6 +2014,21 @@ function getBestSupportedMimeType($mimeTypes = null, $acceptedTypes = false) {
*/
function jsonld_document_loader($url) {
+ switch ($url) {
+ case 'https://www.w3.org/ns/activitystreams':
+ $url = z_root() . '/library/w3org/activitystreams.jsonld';
+ break;
+ case 'https://w3id.org/identity/v1':
+ $url = z_root() . '/library/w3org/identity-v1.jsonld';
+ break;
+ case 'https://w3id.org/security/v1':
+ $url = z_root() . '/library/w3org/security-v1.jsonld';
+ break;
+ default:
+ logger('URL: ' . $url, LOGGER_DEBUG);
+ break;
+ }
+
require_once('library/jsonld/jsonld.php');
$recursion = 0;
@@ -2026,12 +2041,12 @@ function jsonld_document_loader($url) {
}
}
}
+
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);