Commit Graph

40 Commits

Author SHA1 Message Date
Tusooa Zhu 46a5c06853
Make NormalizeMarkup history-aware 2022-07-23 22:50:38 -04:00
Tusooa Zhu fc7ce5f93c
Make NoPlaceholderTextPolicy history-aware 2022-07-23 22:41:04 -04:00
Tusooa Zhu dce7e42928
Make MediaProxyWarmingPolicy history-aware 2022-07-23 22:34:03 -04:00
Tusooa Zhu 0a337063e1
Make ForceMentionsInContent history-aware 2022-07-23 22:23:57 -04:00
Tusooa Zhu cd19537f39
Make EnsureRePrepended history-aware 2022-07-23 17:48:39 -04:00
Tusooa Zhu eba9b0760f
Make MRF Keyword history-aware 2022-07-23 15:56:36 -04:00
Hélène a74ce2d77a
StealEmojiPolicy: fix String rejected_shortcodes
* rejected_shortcodes is defined as a list of strings in the
  configuration description. As such, database-based configuration was
  led to handle those settings as strings, and not as the actually
  expected type, Regex.
* This caused each message passing through this MRF, if a rejected
  shortcode was set and the emoji did not exist already on the instance,
  to fail federating, as an exception was raised, swiftly caught and
  mostly silenced.
* This commit fixes the issue by introducing new behavior: strings are
  now handled as perfect matches for an emoji shortcode (meaning that if
  the emoji-to-be-pulled's shortcode is in the blacklist, it will be
  rejected), while still supporting Regex types as before.
2022-05-18 21:25:10 +02:00
Haelwenn 4605efe272 Merge branch 'improve_anti_followbot_policy' into 'develop'
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy

Closes #2561

See merge request pleroma/pleroma!3498
2022-05-08 18:10:40 +00:00
Ilja a8093732bd Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-08 18:10:40 +00:00
Sean King 17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
Alex Gleason 3bf257171f
ForceMentionsInContent: improve display of Markdown posts 2022-01-27 14:15:06 -06:00
Alex Gleason 27cb3d6273
ForceMentionsInContent: don't apply it to top-level posts 2022-01-26 21:24:26 -06:00
Alex Gleason 0604b0dd09
ForceMentionsInContent: don't mention self 2022-01-25 12:33:47 -06:00
Alex Gleason 65b4d2ce84
ForceMentionsInContent: fix order of mentions 2022-01-25 10:42:34 -06:00
Alex Gleason 267184b70e
ForceMentionsInContentTest: return mentions in a not terrible format 2022-01-24 20:03:43 -06:00
rinpatch a02cfd7f52 Add ForceMentionsInContentPolicy
Even though latest PleromaFE supports displaying these properly, mobile
apps still exist, so I think we should offer a workaround to those who
want it.
2022-01-19 21:04:57 +03:00
Lain Soykaf 2dea4a8c04 StealEmojiPolicyTest: Make mocks explicit. 2021-11-14 11:44:24 +01:00
Haelwenn (lanodan) Monnier c64eae40a2
ObjectAgePolicy: Fix pattern matching on published 2021-08-10 07:41:06 +02:00
Ilja 4ba0beb60c
Make mrfSimple work with tuples
* Changed SimplePolicy
* I also grepped in test/ for ':mrf_simple' to see what other things could be affected
2021-08-06 07:58:58 +02:00
Alex Gleason f2134e605b
Merge remote-tracking branch 'pleroma/develop' into cycles-base-url 2021-05-31 16:49:46 -05:00
Alex Gleason 51a9f97e87
Deprecate Pleroma.Web.base_url/0
Use Pleroma.Web.Endpoint.url/0 directly instead. Reduces compiler cycles.
2021-05-31 16:48:03 -05:00
Alex Gleason 926a233cc4
Merge remote-tracking branch 'upstream/develop' into simplepolicy-announce-leak 2021-04-30 14:21:17 -05:00
Alex Gleason c16c7fdb87
SimplePolicy: filter string Objects 2021-04-30 14:20:54 -05:00
Alex Gleason 3d742c3c1a
SimplePolicy: filter nested objects 2021-04-30 14:20:37 -05:00
Mark Felder 16a7ffb1ea Fix function calls due to module name change 2021-03-30 11:10:44 -05:00
Mark Felder bfcdcd4f69 Temp file leaked, oops 2021-03-30 11:10:44 -05:00
Mark Felder 03f38ac4eb Prefer FollowBot naming convention vs Followbot 2021-03-30 11:10:44 -05:00
Mark Felder fef4f3772c More tests to validate Followbot is behaving 2021-03-30 11:10:44 -05:00
Mark Felder f73d166785 Only need to validate a follow request is generated for now 2021-03-30 11:10:44 -05:00
Haelwenn (lanodan) Monnier 3bc7d12271
Remove sensitive-property setting #nsfw, create HashtagPolicy 2021-02-27 21:26:17 +01:00
Mark Felder 55a13fc360 MRF NoEmptyPolicy: Deny posts from local users if there is no content or only mentions.
Helps prevent accidental button mashes from submitting incomplete posts
2021-02-08 15:32:47 -06:00
Mark Felder e854c35e65 Convert tests to all use clear_config instead of Pleroma.Config.put 2021-01-26 11:58:43 -06: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
Alexander Strizhakov 7bfb041658
insreasing test coverage for StealEmojiPolicy 2020-12-27 21:53:30 +03:00
lain 9ba60f70d2 Tests: Make as many tests as possible async.
In general, tests that match these criteria can be made async:

- Doesn't use real Cachex.
- Doesn't write to the Config / Application Environment.
- Uses Mock. Using Mox is fine.
- Uses the streamer.
2020-12-21 12:21:40 +01:00
Mark Felder 3283d0805f Use Jason instead of Poison in tests 2020-11-23 13:28:55 -06:00
Alexander Strizhakov 8d218ebaf5
Moving some background jobs into simple tasks
- fetching activity data
- attachment prefetching
- using limiter to prevent overload
2020-11-11 13:39:49 +03:00
Egor Kislitsyn 3985c1b450
Fix warnings 2020-10-15 16:54:59 +04:00
Alexander Strizhakov 7f5dbb0201
changes after rebase 2020-10-13 16:44:03 +03:00
Alexander Strizhakov 7dffaef479
tests consistency 2020-10-13 16:35:09 +03:00