diff options
author | Mario <mario@mariovavti.com> | 2025-06-23 09:10:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-06-23 09:10:57 +0000 |
commit | 1a3ca49eba1c8f1630d7e1d0a1845bd0b2a1decf (patch) | |
tree | 976b58f712fa414b167b777554f6d20bc2706d10 /Zotlabs/Module/Home.php | |
parent | 579cf86335a3119cdf5df7269aef038c8e5b36c7 (diff) | |
download | volse-hubzilla-1a3ca49eba1c8f1630d7e1d0a1845bd0b2a1decf.tar.gz volse-hubzilla-1a3ca49eba1c8f1630d7e1d0a1845bd0b2a1decf.tar.bz2 volse-hubzilla-1a3ca49eba1c8f1630d7e1d0a1845bd0b2a1decf.zip |
apply downstream fix from streams: do not sign (request-target) on response
Diffstat (limited to 'Zotlabs/Module/Home.php')
-rw-r--r-- | Zotlabs/Module/Home.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Module/Home.php b/Zotlabs/Module/Home.php index 39a1c8ea4..0dec432d0 100644 --- a/Zotlabs/Module/Home.php +++ b/Zotlabs/Module/Home.php @@ -24,9 +24,13 @@ class Home extends Controller { $key = Config::Get('system', 'prvkey'); $ret = json_encode(Libzot::site_info()); - $headers = ['Content-Type' => 'application/x-zot+json', 'Digest' => HTTPSig::generate_digest_header($ret)]; - $headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI']; - $h = HTTPSig::create_sig($headers, $key, z_root()); + $headers = [ + 'Content-Type' => 'application/x-zot+json', + 'Digest' => HTTPSig::generate_digest_header($ret), + 'Date' => datetime_convert('UTC','UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T') + ]; + + $h = HTTPSig::create_sig($headers, $key, z_root()); HTTPSig::set_headers($h); echo $ret; |