Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Enhance: リモートノートクリーニングジョブの削除対象検索処理のパフォーマンス改善
- Fix: センシティブメディア自動検出周りの依存関係・ファイルの解決に失敗する問題を修正
- Fix: フォロワー限定投稿を指名投稿で引用した際に、引用した投稿の公開範囲が意図せず変更される問題を修正
- Fix: `actor` を持たないInboxアクティビティを受信した際に `getApId()` が `TypeError` を投げて配送ジョブがクラッシュする問題を修正

## 2026.5.4

Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/activitypub/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export function getOneApId(value: ApObject): string {
*/
export function getApId(value: string | IObject): string {
if (typeof value === 'string') return value;
if (typeof value.id === 'string') return value.id;
throw new Error('cannot detemine id');
if (value != null && typeof value.id === 'string') return value.id;
throw new Error('cannot determine id');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export class InboxProcessorService implements OnApplicationShutdown {
this.logger.debug(JSON.stringify(info, null, 2));
//#endregion

// Activities without an actor are invalid; skip them cleanly instead of
// throwing a TypeError deep inside getApId(activity.actor).
if (activity.actor == null) {
throw new Bull.UnrecoverableError('skip: activity has no actor');
}

const host = this.utilityService.toPuny(new URL(signature.keyId).hostname);

if (!this.utilityService.isFederationAllowedHost(host)) {
Expand Down
Loading