1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-16 01:35:50 +02:00

fix: change bare activity.actor to getApId(activity.actor) in InboxPr… (#17340)

* fix: change bare activity.actor to getApId(activity.actor) in InboxProcessorService (closes #17338)

* doc: update CHANGELOG.md to note fix for #17338

* fix: additional activity.actor wrappers in ApInboxService

* Update CHANGELOG.md

---------

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
Evan Prodromou
2026-04-25 22:39:16 -04:00
committed by GitHub
parent 1dc5c60b2b
commit 23715c649c
3 changed files with 11 additions and 10 deletions

View File

@@ -115,9 +115,9 @@ export class InboxProcessorService implements OnApplicationShutdown {
// 対象が4xxならスキップ
if (err instanceof StatusError) {
if (!err.isRetryable) {
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${activity.actor} - ${err.statusCode}`);
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${getApId(activity.actor)} - ${err.statusCode}`);
}
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode}`);
throw new Error(`Error in actor ${getApId(activity.actor)} - ${err.statusCode}`);
}
}
}
@@ -136,7 +136,7 @@ export class InboxProcessorService implements OnApplicationShutdown {
const httpSignatureValidated = httpSignature.verifySignature(signature, authUser.key.keyPem);
// また、signatureのsignerは、activity.actorと一致する必要がある
if (!httpSignatureValidated || authUser.user.uri !== activity.actor) {
if (!httpSignatureValidated || authUser.user.uri !== getApId(activity.actor)) {
// 一致しなくても、でもLD-Signatureがありそうならそっちも見る
const ldSignature = activity.signature;
if (ldSignature) {
@@ -187,8 +187,8 @@ export class InboxProcessorService implements OnApplicationShutdown {
//#endregion
// もう一度actorチェック
if (authUser.user.uri !== activity.actor) {
throw new Bull.UnrecoverableError(`skip: LD-Signature user(${authUser.user.uri}) !== activity.actor(${activity.actor})`);
if (authUser.user.uri !== getApId(activity.actor)) {
throw new Bull.UnrecoverableError(`skip: LD-Signature user(${authUser.user.uri}) !== activity.actor(${getApId(activity.actor)})`);
}
const ldHost = this.utilityService.extractDbHost(authUser.user.uri);