akkoma/lib/pleroma/web/activity_pub
Oneric 932810c35e mrf/object_age: fix handling of non-public objects
Current logic unconditionally adds public adressing to "cc"
and follower adressing to "to" after attempting to strip it
from the other one. This creates serious problems:

First the bug prompting this investigation and fix,
unconditional addition creates duplicates when adressing
URIs already were in their intended final field; e.g.
this is prominently the case for all "unlisted" posts.
Since List.delete only removes the first occurence,
this then broke follower-adress stripping later on
making the policy ineffective.

It’s also just not safe in general wrt to non-public adressing:
e.g. pre-existing duplicates didn’t get fully stripped,
bespoke adressing modes with only one of public addressing
or follower addressing are mangled — and most importantly:
any belatedly received DM or follower-only post
also got public adressing added!
Shockingly this last point was actually asserted as "correct" in tests;
it appears to be a mistake from mindless match adjustments
while fixing crashes on nil adressing in
10c792110e.

Clean up this sloppy logic up, making sure no more duplicates are
added by us, all instances of relevant adresses are purged and only
readded when they actually existed to begin with.
2024-11-17 00:44:51 +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 adjust logic to use relation :signing_key 2024-10-26 05:05:47 +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 adjust logic to use relation :signing_key 2024-10-26 05:05:47 +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 Post editing (#202) 2022-09-06 19:24:02 +00:00
pipeline.ex Refactor ES on top of search behaviour 2022-06-30 16:28:31 +01:00
publisher.ex MIX FORMAT 2023-08-15 23:26:22 +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 Federate emoji as anonymous objects 2024-06-23 20:46:59 +02: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