From c9d697ab7842e5672579cfb0e9bd0594ff95fe19 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 23 Dec 2010 10:49:00 +0000 Subject: merges r29976 from trunk into ruby_1_9_2. -- * lib/uri/common.rb (URI::WFKV_): get rid of backtrack explosion by nested repeat operators. [ruby-core:33464] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/uri/common.rb | 2 +- test/uri/test_common.rb | 2 ++ version.h | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index abe086aea5..7095d07880 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 29 22:55:24 2010 Nobuyoshi Nakada + + * lib/uri/common.rb (URI::WFKV_): get rid of backtrack explosion + by nested repeat operators. [ruby-core:33464] + Mon Nov 29 18:31:31 2010 Martin Duerst * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 58fd422a5d..00a543c9f2 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -801,7 +801,7 @@ module URI str end - WFKV_ = '(?:%\h\h|[^%#=;&]+)' # :nodoc: + WFKV_ = '(?:%\h\h|[^%#=;&])' # :nodoc: # Decode URL-encoded form data from given +str+. # diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 01381b20e6..1fac9c4fee 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -95,6 +95,8 @@ class TestCommon < Test::Unit::TestCase assert_raise(ArgumentError){URI.decode_www_form("a=1&%=2")} assert_raise(ArgumentError){URI.decode_www_form("a=1&b=%")} assert_raise(ArgumentError){URI.decode_www_form("a&b")} + bug4098 = '[ruby-core:33464]' + assert_raise(ArgumentError, bug4098){URI.decode_www_form("a=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&b")} end end diff --git a/version.h b/version.h index 314d8dc3e7..047fc88fc6 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 111 +#define RUBY_PATCHLEVEL 112 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- cgit v1.2.3