Skip remote media URLs that don't have a hostname
This commit is contained in:
parent
3202bdd744
commit
53ae431867
2 changed files with 4 additions and 1 deletions
|
@ -138,7 +138,7 @@ class Account < ApplicationRecord
|
|||
def avatar_remote_url=(url)
|
||||
parsed_url = URI.parse(url)
|
||||
|
||||
return if !%w(http https).include?(parsed_url.scheme) || self[:avatar_remote_url] == url
|
||||
return if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty? || self[:avatar_remote_url] == url
|
||||
|
||||
self.avatar = parsed_url
|
||||
self[:avatar_remote_url] = url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue