Commit graph

20 commits

Author SHA1 Message Date
ilja ffc3078739
Fix MRF policies to also work with Update
Objects who got updated would just pass through several of the MRF policies, undoing moderation in some situations.
In the relevant cases we now check not only for Create activities, but also Update activities.

I checked which ones checked explicitly on type Create using `grep '"type" => "Create"' lib/pleroma/web/activity_pub/mrf/*`.

The following from that list have not been changed:
* lib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex
    * Not relevant for moderation
* lib/pleroma/web/activity_pub/mrf/keyword_policy.ex
    * Already had a test for Update
* lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
    * In practice only relevant when fetching old objects (e.g. through Like or Announce). These are always wrapped in a Create.
* lib/pleroma/web/activity_pub/mrf/reject_non_public.ex
    * We don't allow changing scope with Update, so not relevant here
2022-12-09 15:09:48 +01:00
ilja ab081932c7
Fix tagpolicy to also work with Update
Objects who got updated would just pass the TagPolicy, undoing the moderation that was set in place for the Actor.
Now we check not only for Create activities, but also Update activities.
2022-12-09 15:09:48 +01:00
Alex Gleason fe4c4a7178
MRF: create MRF.Policy behaviour separate from MRF module
Speeds up recompilation by reducing compile-time deps
2021-06-07 14:22:08 -05:00
Haelwenn (lanodan) Monnier 3bc7d12271
Remove sensitive-property setting #nsfw, create HashtagPolicy 2021-02-27 21:26:17 +01:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Haelwenn (lanodan) Monnier 858d9fc7e8
MRF Policies: Return a {:reject, reason} instead of {:reject, nil} 2020-07-14 11:04:16 +02:00
Mark Felder 05da5f5cca Update Copyrights 2020-03-03 16:44:49 -06:00
Ariadne Conill 4244e17de0 fix credo 2019-08-13 22:36:24 +00:00
Ariadne Conill c574b7a1fc MRF: add describe() to all modules, add base MRF configuration to base describe() 2019-08-13 22:08:58 +00:00
Ariadne Conill b93498eb52 constants: add as_public constant and use it everywhere 2019-07-29 02:43:19 +00:00
Maksim bb8065a1fd tests MRF filters 2019-07-10 05:12:21 +00:00
Aaron Tinio 70235ce840 Fix typo: s/"tags"/"tag"/g 2019-05-17 09:02:34 +08:00
Haelwenn (lanodan) Monnier e41a2f98d5
mrf/tag_policy.ex: Add some documentation
mrf_tag:disable-remote-subscription exact way of working is quite
unclear to me. Is it the requester that is denied if they have a tag,
or is it the requestee if they have one?
2019-05-06 04:53:11 +02:00
Haelwenn (lanodan) Monnier af62ace954
Add short documentation on every MRF Policy 2019-05-06 04:49:50 +02:00
William Pitcock 7d110be119 activitypub: mrf: tag policy: fix force-unlisted and sandbox actions 2019-02-04 19:03:54 +00:00
William Pitcock 64a3993425 activitypub: mrf: tag policy: add support for subscription control 2019-02-04 17:48:48 +00:00
William Pitcock ff2c28fd6d activitypub: mrf: tag policy: refactor the filtering hook a bit 2019-02-04 17:06:37 +00:00
William Pitcock 9a69f08e86 activitypub: mrf: tag policy: add support for processing follow requests 2019-02-04 17:04:05 +00:00
William Pitcock 084bb8ccd5 activitypub: mrf: tag policy: implement force-unlisted and sandbox 2019-02-04 17:04:05 +00:00
William Pitcock 88e32a32ce mrf: add initial MRF.TagPolicy engine 2019-02-04 17:04:05 +00:00