Fix headers (string to array) and make sure the signature doesn't change

This commit is contained in:
Philipp 2021-08-25 13:45:00 +02:00
parent f2dcc2788d
commit befd5c860d
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
3 changed files with 14 additions and 16 deletions

View file

@ -88,9 +88,10 @@ class Magic extends BaseModule
$exp = explode('/profile/', $contact['url']);
$basepath = $exp[0];
$header = [];
$header['Accept'] = 'application/x-dfrn+json, application/x-zot+json';
$header['X-Open-Web-Auth'] = Strings::getRandomHex();
$header = [
'Accept' => ['application/x-dfrn+json', 'application/x-zot+json'],
'X-Open-Web-Auth' => [Strings::getRandomHex()],
];
// Create a header that is signed with the local users private key.
$header = HTTPSignature::createSig(