logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 5a5a193877dd890db5682d1809e02d4908d11144
parent d21aa1a77cbda323ae2e82ea7910e076b6011571
Author: Mark Felder <feld@feld.me>
Date:   Thu,  7 Mar 2024 14:19:03 -0500

Fix broken Rich Media parsing when the image URL is a relative path

Diffstat:

Mlib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex b/lib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex @@ -22,7 +22,8 @@ defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do defp aws_signed_url?(image) when is_binary(image) and image != "" do %URI{host: host, query: query} = URI.parse(image) - String.contains?(host, "amazonaws.com") and String.contains?(query, "X-Amz-Expires") + is_binary(host) and String.contains?(host, "amazonaws.com") and + String.contains?(query, "X-Amz-Expires") end defp aws_signed_url?(_), do: nil