From d88c67eba37569a95691bc967046eed318e39b46 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 Sep 2023 10:45:33 +0000 Subject: deprecate the ancient $a variable --- Zotlabs/Web/Router.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Web') diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php index a6a841ccb..2876fcc3c 100644 --- a/Zotlabs/Web/Router.php +++ b/Zotlabs/Web/Router.php @@ -224,7 +224,7 @@ class Router { } elseif(function_exists(App::$module . '_init')) { $func = App::$module . '_init'; - $func($a); + $func(); } } @@ -257,13 +257,13 @@ class Router { if(function_exists(str_replace('-', '_', $current_theme[0]) . '_init')) { $func = str_replace('-', '_', $current_theme[0]) . '_init'; - $func($a); + $func(); } elseif (x(App::$theme_info, 'extends') && file_exists('view/theme/' . App::$theme_info['extends'] . '/php/theme.php')) { require_once('view/theme/' . App::$theme_info['extends'] . '/php/theme.php'); if(function_exists(str_replace('-', '_', App::$theme_info['extends']) . '_init')) { $func = str_replace('-', '_', App::$theme_info['extends']) . '_init'; - $func($a); + $func(); } } @@ -275,7 +275,7 @@ class Router { } elseif(function_exists(App::$module . '_post')) { $func = App::$module . '_post'; - $func($a); + $func(); } } @@ -289,7 +289,7 @@ class Router { } elseif(function_exists(App::$module . '_content')) { $func = App::$module . '_content'; - $arr = array('content' => $func($a)); + $arr = array('content' => $func()); } } call_hooks(App::$module . '_mod_aftercontent', $arr); -- cgit v1.2.3 From f2d7298cf4f81674c808c34ea35d7c7de98b6de1 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 20 Oct 2023 09:30:29 +0000 Subject: check if we have the record in the short time cache before actually fetching it --- Zotlabs/Web/HTTPSig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Web') diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 531b18649..b709d3e44 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -324,7 +324,7 @@ class HTTPSig { } // The record wasn't in cache. Fetch it now. - $r = Activity::fetch($id); + $r = Activity::get_actor($id); $signatureAlgorithm = EMPTY_STR; if ($r) { -- cgit v1.2.3 From 80bdb39ae3fe7600d5a855ade1d4e8863ca866ee Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 22 Nov 2023 16:41:44 +0000 Subject: case insensitive digest algo --- Zotlabs/Web/HTTPSig.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Web') diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index b709d3e44..36a00528e 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -212,7 +212,8 @@ class HTTPSig { if (in_array('digest', $signed_headers)) { $result['content_signed'] = true; - $digest = explode('=', $headers['digest'], 2); + $digest = explode('=', $headers['digest'], 2); + $digest[0] = strtoupper($digest[0]); if ($digest[0] === 'SHA-256') $hashalg = 'sha256'; if ($digest[0] === 'SHA-512') -- cgit v1.2.3