logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: f36851acbd20904220384ccc8128ccbe55b62282
parent cfd2c08ef6f090a669dbb646b12d554f816b4c35
Author: Phantasm <phantasm@centrum.cz>
Date:   Fri, 10 Oct 2025 22:41:24 +0200

credo lint

Diffstat:

Mlib/pleroma/http.ex7++++---
Mlib/pleroma/web/media_proxy.ex5+++--
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/pleroma/http.ex b/lib/pleroma/http.ex @@ -220,9 +220,10 @@ defmodule Pleroma.HTTP do defp query_encode_kv_pair({key, value}, rules \\ []) when is_list(rules) do cond do length(rules) > 0 -> - # URI.encode_query/2 does not appear to follow spec and encodes all parts of our URI path Constant. - # This appears to work outside of edge-cases like The Guardian Rich Media Cards, - # keeping behavior same as with URI.encode_query/2 unless otherwise specified via rules. + # URI.encode_query/2 does not appear to follow spec and encodes all part + # of our URI path Constant. This appears to work outside of edge-cases + # like The Guardian Rich Media Cards, keeping behavior same as with + # URI.encode_query/2 unless otherwise specified via rules. (URI.encode_www_form(Kernel.to_string(key)) <> "=" <> URI.encode(value, fn byte -> diff --git a/lib/pleroma/web/media_proxy.ex b/lib/pleroma/web/media_proxy.ex @@ -101,10 +101,11 @@ defmodule Pleroma.Web.MediaProxy do end # The URL coming into MediaProxy from the outside might have wrong %-encoding - # (like older Pleroma versions) + # (like older Pleroma versions). # This would cause an inconsistency with the encoded URL here and the requested # URL fixed with Pleroma.Tesla.Middleware.EncodeUrl. - # End result is a failing HEAD request in Pleroma.Web.MediaProxy.MediaProxyController.handle_preview/2 + # End result is a failing HEAD request in + # Pleroma.Web.MediaProxy.MediaProxyController.handle_preview/2 def encode_url(url) do url = HTTP.encode_url(url) {base64, sig64} = base64_sig64(url)