From 42a8ed658e93ff6cc6d650ca3069c69ce65316fd Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sat, 19 Mar 2016 17:05:43 -0400 Subject: [PATCH] Authenticate metadata box urls --- lib/vagrant/action/builtin/box_add.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index b87bf46b6..a161279b8 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -253,7 +253,7 @@ module Vagrant end provider_url = metadata_provider.url - if url != authenticated_url + if provider_url != authenticated_url # Authenticate the provider URL since we're using auth hook_env = env[:hook].call(:authenticate_box_url, box_urls: [provider_url]) authed_urls = hook_env[:box_urls] @@ -261,7 +261,7 @@ module Vagrant raise "Bad box authentication hook, did not generate proper results." end provider_url = authed_urls[0] - end + end box_add( [[provider_url, metadata_provider.url]],