illegal offset warning (prevents encrypted signatures from being used for encrypted messages). Not fatal but can leak metadata.

(cherry picked from commit feda23587c)
This commit is contained in:
zotlabs 2019-08-13 23:53:04 +00:00 committed by Mario
parent e8f3b7f853
commit 88fa18204f

View File

@ -304,7 +304,7 @@ function zot_zot($url, $data, $channel = null,$crypto = null) {
if($channel) { if($channel) {
$headers['X-Zot-Token'] = random_string(); $headers['X-Zot-Token'] = random_string();
$headers['X-Zot-Digest'] = \Zotlabs\Web\HTTPSig::generate_digest_header($data); $headers['X-Zot-Digest'] = \Zotlabs\Web\HTTPSig::generate_digest_header($data);
$h = \Zotlabs\Web\HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),false,'sha512',(($crypto) ? $crypto['hubloc_sitekey'] : ''), (($crypto) ? zot_best_algorithm($crypto['site_crypto']) : '')); $h = \Zotlabs\Web\HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),false,'sha512',(($crypto) ? [ 'key' => $crypto['hubloc_sitekey'], 'algorithm' => $crypto['site_crypto'] ] : false));
} }
$redirects = 0; $redirects = 0;