ruby-changes:44170
From: nagachika <ko1@a...>
Date: Mon, 26 Sep 2016 06:33:46 +0900 (JST)
Subject: [ruby-changes:44170] nagachika:r56243 (ruby_2_3): merge revision(s) 56166: [Backport #12766]
nagachika 2016-09-26 06:33:38 +0900 (Mon, 26 Sep 2016) New Revision: 56243 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56243 Log: merge revision(s) 56166: [Backport #12766] * lib/uri/generic.rb (def check_password): don't include bad password in URI exception output * test/uri/test_generic.rb (def test_set_component): test for behavior Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/lib/uri/generic.rb branches/ruby_2_3/test/uri/test_generic.rb branches/ruby_2_3/version.h Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 56242) +++ ruby_2_3/ChangeLog (revision 56243) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Mon Sep 26 06:33:16 2016 Aaron Patterson <tenderlove@r...> + + * lib/uri/generic.rb (def check_password): don't include bad password + in URI exception output + + * test/uri/test_generic.rb (def test_set_component): test for behavior + Mon Sep 26 06:20:58 2016 CHIKANAGA Tomoyuki <nagachika@r...> * tool/downloader.rb: comment out gem package verification. Index: ruby_2_3/test/uri/test_generic.rb =================================================================== --- ruby_2_3/test/uri/test_generic.rb (revision 56242) +++ ruby_2_3/test/uri/test_generic.rb (revision 56243) @@ -749,6 +749,15 @@ class URI::TestGeneric < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/uri/test_generic.rb#L749 assert_equal('foo:xyzzy', uri.to_s) end + def test_bad_password_component + uri = URI.parse('http://foo:bar@baz') + password = 'foo@bar' + e = assert_raise(URI::InvalidComponentError) do + uri.password = password + end + refute_match password, e.message + end + def test_set_scheme uri = URI.parse 'HTTP://example' Index: ruby_2_3/lib/uri/generic.rb =================================================================== --- ruby_2_3/lib/uri/generic.rb (revision 56242) +++ ruby_2_3/lib/uri/generic.rb (revision 56243) @@ -428,7 +428,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/ruby_2_3/lib/uri/generic.rb#L428 if parser.regexp[:USERINFO] !~ v raise InvalidComponentError, - "bad component(expected user component): #{v}" + "bad password component" end return true Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 56242) +++ ruby_2_3/version.h (revision 56243) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.2" #define RUBY_RELEASE_DATE "2016-09-26" -#define RUBY_PATCHLEVEL 186 +#define RUBY_PATCHLEVEL 187 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 9 Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r56166 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/