From commits-return-8299-archive-asf-public=cust-asf.ponee.io@buildr.apache.org Wed May 23 01:13:22 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1B940180638 for ; Wed, 23 May 2018 01:13:21 +0200 (CEST) Received: (qmail 65782 invoked by uid 500); 22 May 2018 23:13:21 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 65773 invoked by uid 99); 22 May 2018 23:13:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2018 23:13:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DAC7EE10D0; Tue, 22 May 2018 23:13:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: donaldp@apache.org To: commits@buildr.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Wed May 23 09:13:07 2018 +1000 Committer: Peter Donald 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