1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2016-09-25 21:33:38 +00:00
parent c84dd6fcf9
commit d45d826f94
4 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Mon Sep 26 06:33:16 2016 Aaron Patterson <tenderlove@ruby-lang.org>
* 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@ruby-lang.org>
* tool/downloader.rb: comment out gem package verification.

View file

@ -428,7 +428,7 @@ module URI
if parser.regexp[:USERINFO] !~ v
raise InvalidComponentError,
"bad component(expected user component): #{v}"
"bad password component"
end
return true

View file

@ -749,6 +749,15 @@ class URI::TestGeneric < Test::Unit::TestCase
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'

View file

@ -1,6 +1,6 @@
#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