diff options
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 7 | ||||
-rw-r--r-- | include/zot.php | 12 |
2 files changed, 9 insertions, 10 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 0b264ca7a..a27edb73d 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -152,7 +152,7 @@ class HTTPSig { } } - logger('Content_Valid: ' . $result['content_valid']); + logger('Content_Valid: ' . (($result['content_valid']) ? 'true' : 'false')); return $result; @@ -194,8 +194,6 @@ class HTTPSig { static function create_sig($request,$head,$prvkey,$keyid = 'Key',$send_headers = false,$auth = false,$alg = 'sha256', $crypt_key = null, $crypt_algo = 'aes256ctr') { -logger('cryptkey' . $crypt_key); - $return_headers = []; if($alg === 'sha256') { @@ -212,9 +210,6 @@ logger('cryptkey' . $crypt_key); if($crypt_key) { $x = crypto_encapsulate($headerval,$crypt_key,$crypt_algo); - -logger('cryptosig: ' . print_r($x,true)); - $headerval = 'iv="' . $x['iv'] . '",key="' . $x['key'] . '",alg="' . $x['alg'] . '",data="' . $x['data'] . '"'; } diff --git a/include/zot.php b/include/zot.php index 16b0a1c8e..331ec35e3 100644 --- a/include/zot.php +++ b/include/zot.php @@ -296,8 +296,6 @@ function zot_zot($url, $data, $channel = null,$crypto = null) { $headers = []; -logger('crypto: ' . print_r($crypto,true)); - if($channel) { $headers['X-Zot-Token'] = random_string(); $hash = \Zotlabs\Web\HTTPSig::generate_digest($data,false); @@ -5107,18 +5105,24 @@ function zot_reply_notify($data) { if($zret['success'] && $zret['hubloc'] && $zret['hubloc']['hubloc_guid'] === $data['sender']['guid'] && $data['msg']) { logger('zot6_delivery',LOGGER_DEBUG); logger('zot6_data: ' . print_r($data,true),LOGGER_DATA); + + $ret['collected'] = true; + $import = [ 'success' => true, 'pickup' => [ [ 'notify' => $data, 'message' => json_decode($data['msg'],true) ] ] ]; - // unset($import['pickup'][0]['notify']['msg']); + unset($import['pickup'][0]['notify']['msg']); logger('import: ' . print_r($import,true), LOGGER_DATA); - $x = zot_import([ 'body' => json_encode($import) ],$data['sender']['url']); + $x = zot_import([ 'success' => true, 'body' => json_encode($import) ], $data['sender']['url']); if($x) { $x = crypto_encapsulate(json_encode($x),$zret['hubloc']['hubloc_sitekey'],zot_best_algorithm($zret['hubloc']['site_crypto'])); $ret['delivery_report'] = $x; } } else { + + // handle traditional zot delivery + $async = get_config('system','queued_fetch'); if($async) { |