ruby-changes:65758
From: usa <ko1@a...>
Date: Mon, 5 Apr 2021 07:27:44 +0900 (JST)
Subject: [ruby-changes:65758] 49b37893a4 (ruby_2_6): merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830]
https://git.ruby-lang.org/ruby.git/commit/?id=49b37893a4 From 49b37893a4189c388e51f711bd4164e1037e277b Mon Sep 17 00:00:00 2001 From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Sun, 4 Apr 2021 22:27:35 +0000 Subject: merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830] [ruby/uri] Check if DN exists https://bugs.ruby-lang.org/issues/16830 https://github.com/ruby/uri/commit/b4bf8c1217 --- lib/uri/ldap.rb | 1 + test/uri/test_ldap.rb | 4 ++++ 2 files changed, 5 insertions(+) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/ldap.rb | 1 + test/uri/test_ldap.rb | 4 ++++ version.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/uri/ldap.rb b/lib/uri/ldap.rb index 228c793..61ec3d3 100644 --- a/lib/uri/ldap.rb +++ b/lib/uri/ldap.rb @@ -119,6 +119,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/ldap.rb#L119 # Private method to cleanup +dn+ from using the +path+ component attribute. def parse_dn + raise InvalidURIError, 'bad LDAP URL' unless @path @dn = @path[1..-1] end private :parse_dn diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb index adad445..64845e4 100644 --- a/test/uri/test_ldap.rb +++ b/test/uri/test_ldap.rb @@ -95,6 +95,10 @@ class TestLDAP < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/uri/test_ldap.rb#L95 u.select(:scheme, :host, :not_exist, :port) end end + + def test_parse_invalid_uri + assert_raise(URI::InvalidURIError) {URI.parse("ldap:https://example.com")} + end end diff --git a/version.h b/version.h index 82522cd..8c108d0 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.6.7" #define RUBY_RELEASE_DATE "2021-04-05" -#define RUBY_PATCHLEVEL 173 +#define RUBY_PATCHLEVEL 174 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 4 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/