misskey/packages/backend
SASAPIYO (SASAGAWA Kiyoshi) ae5d2d40d7
fix(backend): skip inbox activities without an actor instead of throwing TypeError (#17558)
* fix(backend): skip inbox activities without an actor instead of throwing TypeError

- guard getApId() against null/undefined (and fix the 'detemine' typo)
- skip actor-less inbox activities early with Bull.UnrecoverableError

Fixes #17557

* fix(backend): reject actor-less inbox activities at enqueue time

Per review feedback (#17558), move the actor presence check to the inbox
HTTP handler and drop the processor-side guard.

- ActivityPubServerService.inbox(): validate the request body from the
  loose (unknown) type and return 400 for structurally invalid activities
  (non-object / missing actor) instead of enqueueing a job that can never
  be authenticated. Avoids useless retries and TypeError noise.
- InboxProcessorService.process(): remove the actor null guard; IActivity.actor
  is non-null, so the check is unnecessary once enqueue is validated.
- getApId(): widen the parameter to include undefined so the existing null
  guard is type-honest (getOneApId can pass value[0] of an empty array).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 15:00:17 +09:00
..
.vscode Update settings.json 2022-04-15 21:33:00 +09:00
assets fix(backend): robots.txtで返却する内容の調整 (#17165) 2026-04-15 09:56:07 +09:00
migration fix(backend): consolidate index creation logic and remove redundant migration (#17581) 2026-06-18 21:16:21 +09:00
nsfw-model feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
scripts enhance(backend): bundle backend using Rolldown (#17068) 2026-04-16 12:44:50 +09:00
src fix(backend): skip inbox activities without an actor instead of throwing TypeError (#17558) 2026-06-19 15:00:17 +09:00
test fix(backend/oauth2): Token Grantエンドポイントのバリデーションを修正 (#17580) 2026-06-18 18:40:37 +09:00
test-federation chore(deps): update [docker] update dependencies [ci skip] (#17369) 2026-05-03 18:22:37 +09:00
test-server enhance(backend/test): Migrate tests to vitest (#16935) 2026-04-20 14:57:29 +09:00
.madgerc Create .madgerc 2022-09-20 01:04:08 +09:00
eslint.config.js enable and fix no-unused-vars and no-async-promise-executor (#17070) 2026-01-08 11:49:12 +09:00
ormconfig.js enhance(backend): bundle backend using Rolldown (#17068) 2026-04-16 12:44:50 +09:00
package.json deps: update dependencies (#17575) 2026-06-17 12:13:50 +09:00
README.md chore: ✌️ 2022-12-24 14:39:17 +09:00
rolldown.config.ts fix(backend): NSFW検出モデルが file:// で読み込めない問題を修正 (#17528) 2026-06-03 08:48:32 +09:00
tsconfig.json feat: use tsgo where capable (#16984) 2025-12-22 16:52:05 +09:00
vitest.config.e2e.ts enhance(backend/test): Migrate tests to vitest (#16935) 2026-04-20 14:57:29 +09:00
vitest.config.fed.ts enhance(backend/test): Migrate tests to vitest (#16935) 2026-04-20 14:57:29 +09:00
vitest.config.ts enhance(backend/test): Migrate tests to vitest (#16935) 2026-04-20 14:57:29 +09:00
vitest.config.unit.ts perf: rsa sign on slacc (#17322) 2026-05-12 17:36:49 +09:00

Misskey Backend