logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: aa070c7dafbceb33b9656f54aa552672497942f6
parent a6fd251e440ec3c6734f6b084c8a69f442bcebb0
Author: Mark Felder <feld@feld.me>
Date:   Thu, 28 Dec 2023 23:09:33 -0500

Handle 401s as I have observed it in the wild

Diffstat:

Mchangelog.d/handle_object_fetch_failures.change2+-
Mlib/pleroma/object/fetcher.ex2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/changelog.d/handle_object_fetch_failures.change b/changelog.d/handle_object_fetch_failures.change @@ -1 +1 @@ -Remote object fetch failures will prevent the object fetch job from retrying if the object request returns 403, 404, 410, or exceeds the maximum thread depth. +Remote object fetch failures will prevent the object fetch job from retrying if the object request returns 401, 403, 404, 410, or exceeds the maximum thread depth. diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex @@ -219,7 +219,7 @@ defmodule Pleroma.Object.Fetcher do {:error, {:content_type, nil}} end - {:ok, %{status: 403}} -> + {:ok, %{status: code}} when code in [401, 403] -> {:error, :forbidden} {:ok, %{status: code}} when code in [404, 410] ->