diff --git a/changelog.d/handle_object_fetch_failures.change b/changelog.d/handle_object_fetch_failures.change index 410f95efa..0b1dda38d 100644 --- a/changelog.d/handle_object_fetch_failures.change +++ b/changelog.d/handle_object_fetch_failures.change @@ -1,3 +1,2 @@ Remote object fetch failures will prevent the object fetch job from retrying if the object has been deleted or the fetch was denied with a 403 due to instance block behavior with authorized_fetch enabled. -Mark instances as unreachable when object fetch is denied due to instance block and authorized_fetch. Skip fetching objects from unreachable instances. diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex index 75f39fb6a..f1a0a483b 100644 --- a/lib/pleroma/object/fetcher.ex +++ b/lib/pleroma/object/fetcher.ex @@ -213,7 +213,6 @@ defmodule Pleroma.Object.Fetcher do end {:ok, %{status: 403}} -> - Instances.set_consistently_unreachable(id) {:error, "Object fetch has been denied"} {:ok, %{status: code}} when code in [404, 410] -> diff --git a/test/pleroma/object/fetcher_test.exs b/test/pleroma/object/fetcher_test.exs index 80272946c..53c9277d6 100644 --- a/test/pleroma/object/fetcher_test.exs +++ b/test/pleroma/object/fetcher_test.exs @@ -25,9 +25,6 @@ defmodule Pleroma.Object.FetcherTest do %{method: :get, url: "https://mastodon.example.org/users/userisgone404"} -> %Tesla.Env{status: 404} - %{method: :get, url: "https://octodon.social/users/cwebber/statuses/111647596861000656"} -> - %Tesla.Env{status: 403} - %{ method: :get, url: @@ -236,18 +233,6 @@ defmodule Pleroma.Object.FetcherTest do ) end - test "handle HTTP 403 response" do - object_id = "https://octodon.social/users/cwebber/statuses/111647596861000656" - Instances.set_reachable(object_id) - - assert Instances.reachable?(object_id) - - assert {:error, "Object fetch has been denied"} == - Fetcher.fetch_object_from_id(object_id) - - refute Instances.reachable?(object_id) - end - test "it can fetch pleroma polls with attachments" do {:ok, object} = Fetcher.fetch_object_from_id("https://patch.cx/objects/tesla_mock/poll_attachment")