lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-5.0.4 vs lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-5.0.5
- old
+ new
@@ -37,10 +37,10 @@
#
# @return [String]
#
def full_url(path, params={})
url = "#{host[:protocol]}://"
- url += "#{host[:user]}:#{host[:password]}@" if host[:user]
+ url += "#{CGI.escape(host[:user])}:#{CGI.escape(host[:password])}@" if host[:user]
url += "#{host[:host]}:#{host[:port]}"
url += "#{host[:path]}" if host[:path]
url += "/#{full_path(path, params)}"
end