plugins/commands/cloud/auth/middleware/add_authentication.rb in vagrant-unbundled-2.2.16.0 vs plugins/commands/cloud/auth/middleware/add_authentication.rb in vagrant-unbundled-2.2.18.0
- old
+ new
@@ -86,25 +86,26 @@
else
env[:box_urls].map! do |url|
begin
u = URI.parse(url)
q = CGI.parse(u.query || "")
- if q["access_token"]
+ if !q["access_token"].empty?
@logger.warn("Removing access token from URL parameter.")
q.delete("access_token")
if q.empty?
u.query = nil
else
u.query = URI.encode_www_form(q)
end
+ u.to_s
+ else
+ @logger.warn("Authentication token not found as GET parameter.")
+ url
end
-
- u.to_s
rescue URI::Error
url
end
end
- @logger.warn("Authentication token not added as GET parameter.")
end
@app.call(env)
end.freeze
end
end