forked from grumpydevelop/federator
minor logging cleanup
This commit is contained in:
parent
20c2db4b35
commit
f6d6c74bc6
2 changed files with 2 additions and 6 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue