forkey/packages/backend/src
Julia 85096e58b9
Merge commit from fork
* enhance: Add a few validation fixes from Sharkey

See the original MR on the GitLab instance:
https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/484

Co-Authored-By: Dakkar <dakkar@thenautilus.net>

* fix: primitive 2: acceptance of cross-origin alternate

Co-Authored-By: Laura Hausmann <laura@hausmann.dev>

* fix: primitive 3: validation of non-final url

* fix: primitive 4: missing same-origin identifier validation of collection-wrapped activities

* fix: primitives 5 & 8: reject activities with non
string identifiers

Co-Authored-By: Laura Hausmann <laura@hausmann.dev>

* fix: primitive 6: reject anonymous objects that were fetched by their id

* fix: primitives 9, 10 & 11: http signature validation
doesn't enforce required headers or specify auth header name

Co-Authored-By: Laura Hausmann <laura@hausmann.dev>

* fix: primitive 14: improper validation of outbox, followers, following & shared inbox collections

* fix: code style for primitive 14

* fix: primitive 15: improper same-origin validation for
note uri and url

Co-Authored-By: Laura Hausmann <laura@hausmann.dev>

* fix: primitive 16: improper same-origin validation for user uri and url

* fix: primitive 17: note same-origin identifier validation can be bypassed by wrapping the id in an array

* fix: code style for primitive 17

* fix: check attribution against actor in notes

While this isn't strictly required to fix the exploits at hand, this
mirrors the fix in `ApQuestionService` for GHSA-5h8r-gq97-xv69, as a
preemptive countermeasure.

* fix: primitive 18: `ap/get` bypasses access checks

One might argue that we could make this one actually preform access
checks against the returned activity object, but I feel like that's a
lot more work than just restricting it to administrators, since, to me
at least, it seems more like a debugging tool than anything else.

* fix: primitive 19 & 20: respect blocks and hide more

Ideally, the user property should also be hidden (as leaving it in leaks
information slightly), but given the schema of the note endpoint, I
don't think that would be possible without introducing some kind of
"ghost" user, who is attributed for posts by users who have you blocked.

* fix: primitives 21, 22, and 23: reuse resolver

This also increases the default `recursionLimit` for `Resolver`, as it
theoretically will go higher that it previously would and could possibly
fail on non-malicious collection activities.

* fix: primitives 25-33: proper local instance checks

* revert: fix: primitive 19 & 20

This reverts commit 465a9fe6591de90f78bd3d084e3c01e65dc3cf3c.

---------

Co-authored-by: Dakkar <dakkar@thenautilus.net>
Co-authored-by: Laura Hausmann <laura@hausmann.dev>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
(cherry picked from commit 5f675201f261d5db6a58d3099a190372bb2f09f0)
2024-12-25 04:09:04 +09:00
..
@types fix(backend): 処理に失敗するとidempotentキーを削除してしまいその後のリクエストが通ってしまう問題を修正 (MisskeyIO#591) 2024-04-01 18:44:44 +09:00
boot feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784) 2024-11-06 01:28:14 +09:00
core Merge commit from fork 2024-12-25 04:09:04 +09:00
daemons (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
misc fix(backend): memory leak in memory caches (#14363) 2024-12-25 02:54:31 +09:00
models enhance(Page): ページを非公開にできるように (MisskeyIO#821) 2024-12-11 03:23:16 +09:00
queue Merge commit from fork 2024-12-25 04:09:04 +09:00
server Merge commit from fork 2024-12-25 04:09:04 +09:00
config.ts enhance(queue): inbox と relationship にも MisskeyIO#745 を適用 (MisskeyIO#752) 2024-10-18 23:06:33 +09:00
const.ts (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
decorators.ts code cleanup (MisskeyIO#825) 2024-11-27 05:48:25 +09:00
di-symbols.ts Enhance: アカウント移行機能を使用したユーザーに対してのモデレーションの強化 (#719) 2024-09-16 22:18:41 +09:00
env.ts (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
global.d.ts (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
GlobalModule.ts feat(backend): elasticsearchで検索できるように (MisskeyIO#661) 2024-07-14 07:18:50 +09:00
logger.ts feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784) 2024-11-06 01:28:14 +09:00
MainModule.ts (re) update SPDX-FileCopyrightText 2024-02-13 15:59:27 +00:00
NestLogger.ts feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784) 2024-11-06 01:28:14 +09:00
postgres.ts Enhance: アカウント移行機能を使用したユーザーに対してのモデレーションの強化 (#719) 2024-09-16 22:18:41 +09:00
types.ts feat(moderation): モデレーターがユーザーの名前を変更できるように&トークンを再生成できるように (MisskeyIO#747) 2024-10-18 08:53:33 +09:00