Fix nil host in remotable (#8508)

Host can be nil in urls like
'https:https://example.com/path/file.png'
This commit is contained in:
Renato "Lond" Cerqueira 2018-08-29 21:13:49 +02:00 committed by Eugen Rochko
parent cc26fd71ac
commit 5b2b493a90
2 changed files with 13 additions and 2 deletions

View file

@ -18,7 +18,7 @@ module Remotable
return
end
return if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty? || self[attribute_name] == url
return if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.blank? || self[attribute_name] == url
begin
Request.new(:get, url).perform do |response|