akkoma/lib/pleroma/web/activity_pub
Oneric 8243fc0ef4 federation: strip internal fields from incoming updates and history
When note editing support was added, it was omitted to strip internal
fields from edited notes and their history.

This was uncovered due to Mastodon inlining the like count as a "likes"
collection conflicting with our internal "likes" list causing validation
failures. In a spot check with likes/like_count it was not possible to
inject those internal fields into the local db via Update, but this
was not extensively tested for all fields and avenues.

Similarly address normalisation did not normalise addressing in the
object history, although this was never at risk of being exploitable.

The revision history of the Pleroma MR adding edit support reveals
recusrive stripping was intentionally avoided, since it will end up
removing e.g. emoji from outgoing activities. This appears to still
be true. However, all current internal fields ("pleroma_interal"
appears to be unused) contain data already publicised otherwise anyway.
In the interest of fixing a federation bug (and at worst potential data
injection) quickly outgoing stripping is left non-recursive for now.

Of course the ultimate fix here is to not mix remote and internal data
into the same map in the first place, but unfortunately having a single
map of all truth is a core assumption of *oma's AP doc processing.
Changing this is a masive undertaking and not suitable for providing
a short-term fix.
2025-02-21 19:37:27 +01:00
..
activity_pub Remove deps from Streaming/Persisting behaviors 2021-06-01 13:55:07 -05:00
mrf mrf/object_age: fix handling of non-public objects 2024-11-17 00:44:51 +01:00
object_validator Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
object_validators Prevent key-actor mapping poisoning and key take overs 2025-02-14 22:10:25 +01:00
side_effects Refactor ES on top of search behaviour 2022-06-30 16:28:31 +01:00
views standardise local key id generation 2024-10-30 12:44:01 +00:00
activity_pub.ex Don't return garbage on failed collection fetches 2025-02-14 18:49:51 +01:00
activity_pub_controller.ex Fix http signature plug tests 2024-10-26 05:05:48 +01:00
builder.ex Migrate to phoenix 1.7 (#626) 2023-08-15 10:22:18 +00:00
internal_fetch_actor.ex Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
mrf.ex cosmetic: fix elixir 1.17 compiler warnings in main application 2024-06-19 01:49:59 +02:00
object_validator.ex federation/incoming: improve link_resolve retry decision 2025-01-07 20:27:28 +01:00
pipeline.ex Refactor ES on top of search behaviour 2022-06-30 16:28:31 +01:00
publisher.ex Purge obsolete ap_enabled indicator 2025-01-07 20:27:26 +01:00
relay.ex Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
side_effects.ex RichMedia refactor 2024-06-09 17:33:48 +01:00
transmogrifier.ex federation: strip internal fields from incoming updates and history 2025-02-21 19:37:27 +01:00
utils.ex Migrate to phoenix 1.7 (#626) 2023-08-15 10:22:18 +00:00
visibility.ex local-only-fixed (#138) 2022-08-02 14:46:46 +00:00