buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject buildr git commit: Apply the remainder of the fix that should have been applied in 1.5.6 to decode usernames and passwords prior to passing to the underlying http library
Date Tue, 22 May 2018 23:13:20 GMT
Repository: buildr
Updated Branches:
  refs/heads/master 1aff239f0 -> 7fad53f67


Apply the remainder of the fix that should have been applied in 1.5.6 to decode usernames
and passwords prior to passing to the underlying http library


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/7fad53f6
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/7fad53f6
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/7fad53f6

Branch: refs/heads/master
Commit: 7fad53f677d9518e047743f81f9a0ff92200beab
Parents: 1aff239
Author: Peter Donald <peter@realityforge.org>
Authored: Wed May 23 09:13:07 2018 +1000
Committer: Peter Donald <peter@realityforge.org>
Committed: Wed May 23 09:13:07 2018 +1000

----------------------------------------------------------------------
 CHANGELOG                     | 3 +++
 lib/buildr/core/transports.rb | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/7fad53f6/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 0ad3ce1..63d2b20 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,7 @@
 1.5.7 (Pending)
+* Fixed:  The fix that allowed special characters in usernames and passwords was only partially
applied
+          in the `1.5.6` release. The complete fix that correctly decoded usernames and passwords
before
+          passing them to HTTP library is now been applied.
 
 1.5.6 (2018-05-10)
 * Fixed:  Ensure that the username and passwords declared for repositories are correctly
url encoded for

http://git-wip-us.apache.org/repos/asf/buildr/blob/7fad53f6/lib/buildr/core/transports.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/core/transports.rb b/lib/buildr/core/transports.rb
index e9dd00f..8c42005 100644
--- a/lib/buildr/core/transports.rb
+++ b/lib/buildr/core/transports.rb
@@ -335,7 +335,7 @@ module URI
         end
         headers = { 'Content-MD5'=>Digest::MD5.hexdigest(content.string), 'Content-Type'=>'application/octet-stream',
'User-Agent'=>"Buildr-#{Buildr::VERSION}" }
         request = Net::HTTP::Put.new(request_uri.empty? ? '/' : request_uri, headers)
-        request.basic_auth self.user, self.password if self.user
+        request.basic_auth URI.decode(self.user), URI.decode(self.password) if self.user
         response = nil
         with_progress_bar options[:progress], path.split('/').last, content.size do |progress|
           request.content_length = content.size


Mime
View raw message