logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 807782b7f96ee0e053ad59b464766d750f8a8800
parent 354b700bedf8ad6e9187245977165ebd7bc2fa1c
Author: Mark Felder <feld@feld.me>
Date:   Sat, 25 May 2024 16:27:59 -0400

Fix rich media parsing some Amazon URLs

Diffstat:

Achangelog.d/richmediattl.fix1+
Mlib/pleroma/web/rich_media/parser/ttl/aws_signed_url.ex2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/changelog.d/richmediattl.fix b/changelog.d/richmediattl.fix @@ -0,0 +1 @@ +Parsing of RichMedia TTLs for Amazon URLs when query parameters are nil 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 @@ -23,7 +23,7 @@ defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do %URI{host: host, query: query} = URI.parse(image) is_binary(host) and String.contains?(host, "amazonaws.com") and - String.contains?(query, "X-Amz-Expires") + is_binary(query) and String.contains?(query, "X-Amz-Expires") end defp aws_signed_url?(_), do: nil