aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-01-06 16:34:38 +0000
committerMario <mario@mariovavti.com>2024-01-06 16:34:38 +0000
commite3d30763dabdf12f961ed3d1d7cf4eaee44c65a9 (patch)
treeed3d493e8423ad9ccbde5e8e199e65164820e70f /Zotlabs/Web
parent6252340804bee66736e49de4bdc08755510f1c70 (diff)
downloadvolse-hubzilla-e3d30763dabdf12f961ed3d1d7cf4eaee44c65a9.tar.gz
volse-hubzilla-e3d30763dabdf12f961ed3d1d7cf4eaee44c65a9.tar.bz2
volse-hubzilla-e3d30763dabdf12f961ed3d1d7cf4eaee44c65a9.zip
tests: Integrate the DB in "unit" tests.
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/HTTPSig.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 36a00528e..439ca472b 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -27,9 +27,12 @@ class HTTPSig {
* @param string $alg hash algorithm (one of 'sha256','sha512')
* @return string The generated digest header string for $body
*/
-
static function generate_digest_header($body, $alg = 'sha256') {
+ if ($body === null) {
+ $body = '';
+ }
+
$digest = base64_encode(hash($alg, $body, true));
switch ($alg) {
case 'sha512':