forked from External/greenlight
URI check only for http or https (#2915)
* URI check only for http or https * Update joiner.rb * Update joiner.rb * Update joiner.rb
This commit is contained in:
parent
6e804d550a
commit
42f4fcff5a
|
@ -48,7 +48,7 @@ module Joiner
|
|||
end
|
||||
|
||||
def valid_avatar?(url)
|
||||
return false if URI.regexp.match(url).nil?
|
||||
return false if URI.regexp(['http', 'https']).match(url).nil?
|
||||
uri = URI(url)
|
||||
http = Net::HTTP.new(uri.host, uri.port)
|
||||
http.use_ssl = true if uri.scheme == 'https'
|
||||
|
|
Loading…
Reference in New Issue