This commit is contained in:
tamaina 2024-03-04 09:33:31 +00:00
parent 7a334a5e28
commit 821a79ff28
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ export class InboxProcessorService {
});
// また、signatureのsignerは、activity.actorと一致する必要がある
if (!httpSignatureValidated || authUser.user.uri !== activity.actor) {
if (httpSignatureValidated !== true || authUser.user.uri !== activity.actor) {
// 一致しなくても、でもLD-Signatureがありそうならそっちも見る
if (activity.signature?.creator) {
if (activity.signature.type !== 'RsaSignature2017') {

View File

@ -103,7 +103,7 @@ export class ActivityPubServerService {
let signature: ReturnType<typeof parseRequestSignature>;
const verifyDigest = await verifyDigestHeader(request.raw, request.rawBody || '', true);
if (!verifyDigest) {
if (verifyDigest !== true) {
reply.code(401);
return;
}