[ruby-cvs:68419] nagachika:r61238 (ruby_2_4): merge revision(s) 61197: [Backport #14184]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Thu Dec 14 22:14:12 JST 2017


nagachika	2017-12-14 22:14:12 +0900 (Thu, 14 Dec 2017)

  New Revision: 61238

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61238

  Log:
    merge revision(s) 61197: [Backport #14184]
    
    webrick: compile RE correctly for beginning and end match
    
    Using ^ and $ in regexps means we can accidentally get fooled
    by "%0a" in HTTP request paths being decoded to newline
    characters.  Use \A and \z to match beginning and end-of-string
    respectively, instead.
    
    Thanks to mame and hsbt for reporting.
    
    * lib/webrick/httpserver.rb (MountTable#compile):
      use \A and \z instead of ^ and $
    * lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
    * test/webrick/test_httpserver.rb (test_cntrl_in_path): new test

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/lib/webrick/httpserver.rb
    branches/ruby_2_4/test/webrick/test_httpserver.rb
    branches/ruby_2_4/version.h


More information about the ruby-cvs mailing list