minor logging cleanup

This commit is contained in:
Yannis Vogel 2025-04-17 12:38:45 +02:00
parent 20c2db4b35
commit f6d6c74bc6
No known key found for this signature in database
2 changed files with 2 additions and 6 deletions

View file

@ -225,11 +225,8 @@ class Api extends Main
}
$actor = json_decode($publicKeyData, true);
error_log("actor: " . $publicKeyData);
$publicKeyPem = $actor['publicKey']['publicKeyPem'] ?? null;
error_log($publicKeyPem);
error_log(json_encode($headers));
if (!$publicKeyPem) {
http_response_code(500);
throw new Exceptions\PermissionDenied("Invalid public key format from actor with keyId: $keyId");

View file

@ -53,11 +53,10 @@ class Inbox implements \Federator\Api\FedUsers\FedUsersInterface
$allHeaders = getallheaders();
try {
$result = $this->main->checkSignature($allHeaders);
error_log($result); // Signature verified
$this->main->checkSignature($allHeaders);
} catch (\Federator\Exceptions\PermissionDenied $e) {
error_log("Inbox::post Signature check failed: " . $e->getMessage());
http_response_code(403); // Or 401
http_response_code(401);
exit("Access denied");
}