diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-12 19:46:42 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-12 19:46:42 -0200 |
commit | 89f70938d79cc797a4ddad5aa6cc13bfc5cf08c9 (patch) | |
tree | e367ee4a97ff3f13d7947b943d2b33f083ad362f /actionpack/test/dispatch | |
parent | 5d41cb3bfd6b19833261622ce5d339b1e580bd8b (diff) | |
parent | 918f0eea970c9f0d39b8d470a316ad5109935dae (diff) | |
download | rails-89f70938d79cc797a4ddad5aa6cc13bfc5cf08c9.tar.gz rails-89f70938d79cc797a4ddad5aa6cc13bfc5cf08c9.tar.bz2 rails-89f70938d79cc797a4ddad5aa6cc13bfc5cf08c9.zip |
Merge pull request #23035 from jkowens/fix-null-byte
Prevent static middleware from attempting to serve a request with a null byte
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 1da57ab50b..ea8b5e904e 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -40,6 +40,10 @@ module StaticTests assert_equal "Hello, World!", get("/doorkeeper%E3E4".force_encoding('ASCII-8BIT')).body end + def test_handles_urls_with_null_byte + assert_equal "Hello, World!", get("/doorkeeper%00").body + end + def test_sets_cache_control app = assert_deprecated do ActionDispatch::Static.new(DummyApp, @root, "public, max-age=60") |