From 4e69467b14a01ae3cfded0d75f9cbe6d0b4656c7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 10 Oct 2018 05:37:53 +0000 Subject: SECURITY: signature issue (cherry picked from commit c6f3298f7864756f4a9b7827e8490a3ee859f82f) --- Zotlabs/Zot/Finger.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Zotlabs/Zot') diff --git a/Zotlabs/Zot/Finger.php b/Zotlabs/Zot/Finger.php index 559f9657a..1d20f5822 100644 --- a/Zotlabs/Zot/Finger.php +++ b/Zotlabs/Zot/Finger.php @@ -71,6 +71,11 @@ class Finger { $url = 'https://' . $host; } + $m = parse_url($url); + if($m) { + $parsed_host = strtolower($m['host']); + } + $rhs = '/.well-known/zot-info'; $https = ((strpos($url,'https://') === 0) ? true : false); @@ -88,6 +93,8 @@ class Finger { $headers = []; $headers['X-Zot-Channel'] = $channel['channel_address'] . '@' . \App::get_hostname(); $headers['X-Zot-Nonce'] = random_string(); + $headers['Host'] = $parsed['host']; + $xhead = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false); -- cgit v1.2.3