1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/webrick
normal aac91cb762 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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13 00:38:08 +00:00
..
httpauth lib/*: remove closed checks 2016-11-21 23:05:41 +00:00
httpservlet Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
.document Ignore gemspec under the lib directory for documentation. 2017-12-12 08:34:13 +00:00
accesslog.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
cgi.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
compat.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
config.rb Delay Utils.getservername until needed. 2016-12-07 12:59:48 +00:00
cookie.rb * lib/cgi/cookie.rb (parse): don't allow , as a separator. [Bug #12791] 2016-09-27 03:17:47 +00:00
htmlutils.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
httpauth.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
httpproxy.rb webrick: handle EAGAIN/EWOULDBLOCK on proxy connections 2017-09-19 08:39:22 +00:00
httprequest.rb Multiple values X-Forwarded-Proto in webrick 2016-06-21 10:32:26 +00:00
httpresponse.rb webrick/httpresponse: minor cleanups to reduce memory use 2017-10-31 01:37:37 +00:00
https.rb webrick: fix SNI support 2017-07-18 01:59:28 +00:00
httpserver.rb webrick: compile RE correctly for beginning and end match 2017-12-13 00:38:08 +00:00
httpservlet.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
httpstatus.rb lib/webrick/log.rb: sanitize any type of logs 2017-09-14 11:16:23 +00:00
httputils.rb Define the MIME type for JSON in WEBrick::HTTPUtils::DefaultMimeTypes. 2017-09-19 01:54:28 +00:00
httpversion.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
log.rb lib/webrick/log.rb: sanitize any type of logs 2017-09-14 11:16:23 +00:00
server.rb Add uplevel keyword to Kernel#warn and use it 2017-12-12 11:56:25 +00:00
ssl.rb webrick: fix SNI support 2017-07-18 01:59:28 +00:00
utils.rb Add uplevel keyword to Kernel#warn and use it 2017-12-12 11:56:25 +00:00
version.rb Merge gemspec from ruby/webrick. 2017-05-01 10:20:35 +00:00
webrick.gemspec Fixed invalid gemspec. 2017-10-05 01:43:47 +00:00