Revert "Mark instances as unreachable when returning a 403 from an object fetch"
This reverts commit d472bafec19cee269e7c943bafae7c805785acd7.
This commit is contained in:
parent
e2b04fac5a
commit
30d63aaa6e
3 changed files with 0 additions and 14 deletions
|
@ -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.
|
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.
|
Skip fetching objects from unreachable instances.
|
||||||
|
|
|
@ -344,7 +344,6 @@ defmodule Pleroma.Object.Fetcher do
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
{:ok, %{status: 403}} ->
|
{:ok, %{status: 403}} ->
|
||||||
Instances.set_consistently_unreachable(id)
|
|
||||||
{:error, "Object fetch has been denied"}
|
{:error, "Object fetch has been denied"}
|
||||||
|
|
||||||
{:ok, %{status: code}} when code in [404, 410] ->
|
{:ok, %{status: code}} when code in [404, 410] ->
|
||||||
|
|
|
@ -419,18 +419,6 @@ defmodule Pleroma.Object.FetcherTest do
|
||||||
)
|
)
|
||||||
end
|
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
|
test "it can fetch pleroma polls with attachments" do
|
||||||
{:ok, object} =
|
{:ok, object} =
|
||||||
Fetcher.fetch_object_from_id("https://patch.cx/objects/tesla_mock/poll_attachment")
|
Fetcher.fetch_object_from_id("https://patch.cx/objects/tesla_mock/poll_attachment")
|
||||||
|
|
Loading…
Reference in a new issue