Fix rich media parsing some Amazon URLs
This commit is contained in:
parent
354b700bed
commit
807782b7f9
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 New Issue
Block a user