log signed_data on httpsig verify failure

This commit is contained in:
Mike Macgirvin 2024-04-02 09:21:10 +11:00
parent 10f1f1a60f
commit e99209c825

View file

@ -213,6 +213,9 @@ class HTTPSig
logger('verified: ' . intval($x), LOGGER_DEBUG);
if (!$x) {
// try again, ignoring the local actor (xchan) cache and refetching the key
// from its source
@ -226,9 +229,12 @@ class HTTPSig
if (!$y) {
btlogger('verify failed for ' . $result['signer'] . ' alg=' . $algorithm . (($fkey['public_key']) ? '' : ' no key'));
$sig_block['signature'] = base64_encode($sig_block['signature']);
logger('affected sigblock: ' . print_r($sig_block, true));
logger('headers: ' . print_r($headers, true));
logger('server: ' . print_r($_SERVER, true));
logger('signed_data: ' . print_r($signed_data,true));
return $result;
}
}