### Changed
- quarantining is now considered absolutely; public activities are no longer
an exception.
+- also merged quarantine and mrf reject - quarantine is now deprecated
- flavours:
- amd64 is built for debian stable. Compatible with ubuntu 20.
- ubuntu-jammy is built for... well, ubuntu 22 (LTS)
],
allow_relay: true,
public: true,
- quarantined_instances: [],
static_dir: "instance/static/",
allowed_post_formats: [
"text/plain",
key_placeholder: "instance",
value_placeholder: "reason",
description:
- "List of ActivityPub instances where activities will not be sent, and the reason for doing so",
+ "(Deprecated, will be removed in next release) List of ActivityPub instances where activities will not be sent, and the reason for doing so",
suggestions: [
{"quarantined.com", "Reason"},
{"*.quarantined.com", "Reason"}
* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.
* `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance.
* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
-* `quarantined_instances`: ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them.
+* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them.
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
older software for theses nicknames.
* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
-* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so.
+* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally prevents activities from being sent to that instance.
* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so.
* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
* `report_removal`: List of instances to reject reports from and the reason for doing so.
{[:instance, :mrf_transparency], [:mrf, :transparency],
"\n* `config :pleroma, :instance, mrf_transparency` is now `config :pleroma, :mrf, transparency`"},
{[:instance, :mrf_transparency_exclusions], [:mrf, :transparency_exclusions],
- "\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"}
+ "\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"},
+ {[:instance, :quarantined_instances], [:mrf_simple, :reject],
+ "\n* `config :pleroma, :instance, :quarantined_instances` is now covered by `:pleroma, :mrf_simple, :reject`"}
]
def check_simple_policy_tuples do
end
def check_quarantined_instances_tuples do
- has_strings = Config.get([:instance, :quarantined_instances]) |> Enum.any?(&is_binary/1)
+ has_strings = Config.get([:instance, :quarantined_instances], []) |> Enum.any?(&is_binary/1)
if has_strings do
Logger.warn("""
end
end
+ defp blocked_instances do
+ Config.get([:instance, :quarantined_instances], []) ++
+ Config.get([:mrf_simple, :reject], [])
+ end
+
defp should_federate?(inbox) do
%{host: host} = URI.parse(inbox)
quarantined_instances =
- Config.get([:instance, :quarantined_instances], [])
+ blocked_instances()
|> Pleroma.Web.ActivityPub.MRF.instance_list_from_tuples()
|> Pleroma.Web.ActivityPub.MRF.subdomains_regex()
setup_all do
clear_config([:instance, :federating], true)
clear_config([:instance, :quarantined_instances], [])
+ clear_config([:mrf_simple, :reject], [])
end
describe "gather_webfinger_links/1" do
end
describe "publish/2" do
- test_with_mock "doesn't publish any activity to quarantined instances.",
+ test_with_mock "doesn't publish any activity to quarantined or rejected instances.",
Pleroma.Web.Federator.Publisher,
[:passthrough],
[] do
Config.put([:instance, :quarantined_instances], [{"domain.com", "some reason"}])
+ Config.put([:mrf_simple, :reject], [{"rejected.com", "some reason"}])
+
follower =
insert(:user, %{
local: false,
ap_enabled: true
})
+ another_follower =
+ insert(:user, %{
+ local: false,
+ inbox: "https://rejected.com/users/nick2/inbox",
+ ap_enabled: true
+ })
+
actor = insert(:user, follower_address: follower.ap_id)
{:ok, follower, actor} = Pleroma.User.follow(follower, actor)
+ {:ok, _another_follower, actor} = Pleroma.User.follow(another_follower, actor)
+
actor = refresh_record(actor)
note_activity =
id: public_note_activity.data["id"]
})
)
+
+ assert not called(
+ Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
+ inbox: "https://rejected.com/users/nick2/inbox",
+ actor_id: actor.id,
+ id: note_activity.data["id"]
+ })
+ )
+
+ assert not called(
+ Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
+ inbox: "https://rejected.com/users/nick1/inbox",
+ actor_id: actor.id,
+ id: public_note_activity.data["id"]
+ })
+ )
end
test_with_mock "Publishes a non-public activity to non-quarantined instances.",