Merge pull request #5677 from mrahtz/fix/master/unescape-curl-passwords

Escape/unescape cURL URLs/auth
This commit is contained in:
Seth Vargo 2015-05-30 21:40:18 -07:00
commit 07efee776e
1 changed files with 3 additions and 3 deletions

View File

@ -27,10 +27,10 @@ module Vagrant
@destination = destination.to_s
begin
url = URI.parse(@source)
url = URI.parse(URI.escape(@source))
if url.scheme && url.scheme.start_with?("http") && url.user
auth = "#{url.user}"
auth += ":#{url.password}" if url.password
auth = "#{URI.unescape(url.user)}"
auth += ":#{URI.unescape(url.password)}" if url.password
url.user = nil
url.password = nil
options[:auth] ||= auth