[ruby-cvs:68422] usa:r61241 (ruby_2_3): merge revision(s) 61197: [Backport #14184]

usa at ruby-lang.org usa at ruby-lang.org
Thu Dec 14 22:36:50 JST 2017


usa	2017-12-14 22:36:50 +0900 (Thu, 14 Dec 2017)

  New Revision: 61241

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

  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_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/lib/webrick/httpserver.rb
    branches/ruby_2_3/test/webrick/test_httpserver.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list