mediaproxy: proxy network-path references

Discovered-by: snow
Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/900
(cherry picked from commit bbf974adc82d09a2099fb1234729131929307911)
This commit is contained in:
Oneric 2025-04-14 00:26:10 +02:00 • committed by Lain Soykaf
commit 5cd6894a66
No known key found for this signature in database
4 changed files with 63 additions and 1 deletions

View file

@ -17,6 +17,10 @@ defmodule Pleroma.HTML.Transform.MediaProxy do
{"src", media_url}
end
def scrub_attribute(:img, {"src", "//" <> target}) do
scrub_attribute(:img, {"src", "https://" <> target})
end
def scrub_attribute(_tag, attribute), do: attribute
def scrub({:img, attributes, children}) do