Ensure URLs with IP addresses for the host do not generate previews
This commit is contained in:
parent
579561e97b
commit
0cc038b67c
3 changed files with 10 additions and 8 deletions
|
|
@ -29,6 +29,9 @@ defmodule Pleroma.Web.RichMedia.Helpers do
|
|||
|
||||
defp validate_page_url(%URI{host: host, scheme: "https"}) do
|
||||
cond do
|
||||
Linkify.Parser.ip?(host) ->
|
||||
:error
|
||||
|
||||
host in @config_impl.get([:rich_media, :ignore_hosts], []) ->
|
||||
:error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue