akkoma/test/pleroma/web/activity_pub/mrf
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_expiration_policy_test.exs Fix MRF policies to also work with Update 2022-12-08 23:22:05 +01:00
anti_followbot_policy_test.exs Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-06-29 20:47:44 +01:00
anti_link_spam_policy_test.exs Fix MRF policies to also work with Update 2022-12-08 23:22:05 +01:00
direct_message_disabled_policy_test.exs Fix filtering out incorrect addresses 2023-05-23 13:46:25 +01:00
ensure_re_prepended_test.exs Post editing (#202) 2022-09-06 19:24:02 +00:00
force_bot_unlisted_policy_test.exs Fix MRF policies to also work with Update 2022-12-08 23:22:05 +01:00
hashtag_policy_test.exs Post editing (#202) 2022-09-06 19:24:02 +00:00
hellthread_policy_test.exs Fix MRF policies to also work with Update 2022-12-08 23:22:05 +01:00
inline_quote_policy_test.exs MRF.InlineQuotePolicy: Add link to post URL, not ID 2024-04-12 13:23:50 +02:00
keyword_policy_test.exs Post editing (#202) 2022-09-06 19:24:02 +00:00
media_proxy_warming_policy_test.exs Tag Mock-tests as "mocked" and run them seperately 2023-08-04 12:50:50 +01:00
mention_policy_test.exs Fix MRF policies to also work with Update 2022-12-08 23:22:05 +01:00
no_empty_policy_test.exs Post editing (#202) 2022-09-06 19:24:02 +00:00
no_placeholder_text_policy_test.exs Post editing (#202) 2022-09-06 19:24:02 +00:00
normalize_markup_test.exs weirdly no, images should not have classes 2022-11-26 21:15:10 +00:00
object_age_policy_test.exs mrf/object_age: fix handling of non-public objects 2024-11-17 00:44:51 +01:00
reject_newly_created_account_note_policy_test.exs Fix create processing in direct message disabled 2023-05-23 13:16:20 +01:00
reject_non_public_test.exs Convert tests to all use clear_config instead of Pleroma.Config.put 2021-01-26 11:58:43 -06:00
simple_policy_test.exs Add background_removal to SimplePolicy MRF 2024-02-16 16:36:45 +01:00
steal_emoji_policy_test.exs mrf/steal_emoji: fix size limit check 2024-06-05 20:11:53 +02:00
subchain_policy_test.exs Convert tests to all use clear_config instead of Pleroma.Config.put 2021-01-26 11:58:43 -06:00
tag_policy_test.exs Fix tagpolicy to also work with Update 2022-12-08 21:53:42 +01:00
user_allow_list_policy_test.exs Convert tests to all use clear_config instead of Pleroma.Config.put 2021-01-26 11:58:43 -06:00
vocabulary_policy_test.exs Convert tests to all use clear_config instead of Pleroma.Config.put 2021-01-26 11:58:43 -06:00