Merge pull request #5677 from mrahtz/fix/master/unescape-curl-passwords
Escape/unescape cURL URLs/auth
This commit is contained in:
commit
07efee776e
|
@ -27,10 +27,10 @@ module Vagrant
|
||||||
@destination = destination.to_s
|
@destination = destination.to_s
|
||||||
|
|
||||||
begin
|
begin
|
||||||
url = URI.parse(@source)
|
url = URI.parse(URI.escape(@source))
|
||||||
if url.scheme && url.scheme.start_with?("http") && url.user
|
if url.scheme && url.scheme.start_with?("http") && url.user
|
||||||
auth = "#{url.user}"
|
auth = "#{URI.unescape(url.user)}"
|
||||||
auth += ":#{url.password}" if url.password
|
auth += ":#{URI.unescape(url.password)}" if url.password
|
||||||
url.user = nil
|
url.user = nil
|
||||||
url.password = nil
|
url.password = nil
|
||||||
options[:auth] ||= auth
|
options[:auth] ||= auth
|
||||||
|
|
Loading…
Reference in New Issue