ruby-changes:62372
From: nagachika <ko1@a...>
Date: Thu, 23 Jul 2020 14:02:18 +0900 (JST)
Subject: [ruby-changes:62372] 4f714939ef (ruby_2_7): merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830]
https://git.ruby-lang.org/ruby.git/commit/?id=4f714939ef From 4f714939efde6d6b3b74c09e1e151e6ce6818b90 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Thu, 23 Jul 2020 14:02:05 +0900 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 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 e1a6dfd..874e21a 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L2 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 102 +#define RUBY_PATCHLEVEL 103 #define RUBY_RELEASE_YEAR 2020 #define RUBY_RELEASE_MONTH 7 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/