Add app.vagrantup.com to allowed auth hosts

This should allow users setting VAGRANT_SERVER_URL to app.vagrantup.com to authenticate to private boxes.
This commit is contained in:
Justin Campbell 2017-11-07 10:35:16 -05:00
parent c5266e98b8
commit 40d8dc4582
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ module VagrantPlugins
module LoginCommand
class AddAuthentication
ALLOWED_AUTHENTICATION_HOSTS = %w[
app.vagrantup.com
atlas.hashicorp.com
vagrantcloud.com
].freeze

View File

@ -71,13 +71,15 @@ describe VagrantPlugins::LoginCommand::AddAuthentication do
original = [
"http://google.com/box.box",
"http://app.vagrantup.com/foo.box",
"http://vagrantcloud.com/foo.box",
"http://vagrantcloud.com/bar.box?arg=true",
]
expected = original.dup
expected[1] = "#{original[1]}?access_token=#{token}"
expected[2] = "#{original[2]}&access_token=#{token}"
expected[2] = "#{original[2]}?access_token=#{token}"
expected[3] = "#{original[3]}&access_token=#{token}"
env[:box_urls] = original.dup
subject.call(env)