From 15eb069195f67978c70b219f87c95886201a0f3b Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Thu, 28 Feb 2013 17:46:54 +0530 Subject: [PATCH 1/4] Use strict base encoding otherwise breaks for very large org names. --- lib/fog/vcloud/compute.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/vcloud/compute.rb b/lib/fog/vcloud/compute.rb index 168c60eec..edaa58960 100644 --- a/lib/fog/vcloud/compute.rb +++ b/lib/fog/vcloud/compute.rb @@ -300,7 +300,7 @@ module Fog # Use this to set the Authorization header for login def authorization_header - "Basic #{Base64.encode64("#{@username}:#{@password}").chomp!}" + "Basic #{Base64.strict_encode64("#{@username}:#{@password}")}" end # Actually do the request From de29bfcee8bec547f88b0fb2b9f93c20b3b54016 Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Thu, 28 Feb 2013 18:07:02 +0530 Subject: [PATCH 2/4] revert typo --- lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb b/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb index 5023deabd..86de2ec81 100644 --- a/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb +++ b/lib/fog/vcloud/requests/compute/instantiate_vapp_template.rb @@ -71,7 +71,7 @@ module Fog include Shared def instantiate_vapp_template options = {} - validate_instantiate_vapp_template_options optionsgi + validate_instantiate_vapp_template_options options request( :body => generate_instantiate_vapp_template_request(options), :expects => 201, From 5a3332236153390694ab30950330b5784a1f4d41 Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Thu, 28 Feb 2013 21:40:33 +0530 Subject: [PATCH 3/4] Fix the base encoding issue with Ruby 1.8.7 Compliance --- lib/fog/vcloud/compute.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/vcloud/compute.rb b/lib/fog/vcloud/compute.rb index b3eb58714..c6a6110ed 100644 --- a/lib/fog/vcloud/compute.rb +++ b/lib/fog/vcloud/compute.rb @@ -301,7 +301,7 @@ module Fog # Use this to set the Authorization header for login def authorization_header - "Basic #{Base64.strict_encode64("#{@username}:#{@password}")}" + "Basic #{Base64.encode64("#{@username}:#{@password}").delete("\n")}" end # Actually do the request From 9e8bb10684b3ab35e42d7e8a140019a934b348d4 Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Fri, 1 Mar 2013 13:17:39 +0530 Subject: [PATCH 4/4] Delete \r also --- lib/fog/vcloud/compute.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/vcloud/compute.rb b/lib/fog/vcloud/compute.rb index c6a6110ed..4cc393460 100644 --- a/lib/fog/vcloud/compute.rb +++ b/lib/fog/vcloud/compute.rb @@ -301,7 +301,7 @@ module Fog # Use this to set the Authorization header for login def authorization_header - "Basic #{Base64.encode64("#{@username}:#{@password}").delete("\n")}" + "Basic #{Base64.encode64("#{@username}:#{@password}").delete("\r\n")}" end # Actually do the request