Skip to content
Snippets Groups Projects
Unverified Commit 42f4fcff authored by hiroshisuga's avatar hiroshisuga Committed by GitHub
Browse files

URI check only for http or https (#2915)

* URI check only for http or https

* Update joiner.rb

* Update joiner.rb

* Update joiner.rb
parent 6e804d55
No related branches found
No related tags found
No related merge requests found
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment