pleroma/test
Lain Soykaf 20354e0aee
fix(fetcher): require fetched documents to have the fetched id
The fetcher accepted any document whose id was on the same host as the
fetch URL. Anyone who can place a JSON file on a host, for example
through an upload, could pass it off as another object or actor from
that host.

The id of a fetched document must now be the URL it came from (after
redirects), ignoring a trailing slash, the fragment, the host case and
differences that our URL encoding removes.
If it differs, as for Mastodon's /@user/123 display URLs, we refetch
once from that id, which must be on the same host. The refetch must
not redirect and must match exactly.

Test mocks that served a document under a different URL now serve it
from its own id.

Based on Akkoma 8684964c5 and 940792f8b.
2026-10-27 21:58:41 +04:00
..
config Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
credo/check/consistency Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
fixtures fix(fetcher): require fetched documents to have the fetched id 2026-10-27 21:58:41 +04:00
instance_static support for special chars in pack name 2020-09-24 09:12:37 +03:00
mix fix(webhooks): merge develop and harden delivery 2026-07-26 17:00:14 +04:00
pleroma fix(fetcher): require fetched documents to have the fetched id 2026-10-27 21:58:41 +04:00
support fix(fetcher): require fetched documents to have the fetched id 2026-10-27 21:58:41 +04:00
test_helper.exs Add ParadeDB docker integration test 2026-03-03 12:36:01 +04:00