mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Fix rich media parsing some Amazon URLs
This commit is contained in:
parent
354b700bed
commit
807782b7f9
2 changed files with 2 additions and 1 deletions
1
changelog.d/richmediattl.fix
Normal file
1
changelog.d/richmediattl.fix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Parsing of RichMedia TTLs for Amazon URLs when query parameters are nil
|
|
@ -23,7 +23,7 @@ defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl do
|
||||||
%URI{host: host, query: query} = URI.parse(image)
|
%URI{host: host, query: query} = URI.parse(image)
|
||||||
|
|
||||||
is_binary(host) and String.contains?(host, "amazonaws.com") and
|
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
|
end
|
||||||
|
|
||||||
defp aws_signed_url?(_), do: nil
|
defp aws_signed_url?(_), do: nil
|
||||||
|
|
Loading…
Reference in a new issue