Improved logging for invalid HTTP signatures

This commit is contained in:
Michael 2021-05-01 12:32:33 +00:00
parent cea00f5f75
commit d8901452fc
2 changed files with 16 additions and 2 deletions

View file

@ -111,9 +111,12 @@ class Receiver
}
$http_signer = HTTPSignature::getSigner($body, $header);
if (empty($http_signer)) {
if ($http_signer === false) {
Logger::warning('Invalid HTTP signature, message will be discarded.');
return;
} elseif (empty($http_signer)) {
Logger::info('Signer is a tombstone. The message will be discarded, the signer account is deleted.');
return;
} else {
Logger::info('Valid HTTP signature', ['signer' => $http_signer]);
}