mirror of
https://github.com/github/rails.git
synced 2026-01-13 00:28:26 -05:00
Compare commits
2 Commits
github37
...
CVE-2013-6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f46236555e | ||
|
|
ec15cd282d |
@@ -11,6 +11,17 @@ class QueryStringParsingTest < ActionController::IntegrationTest
|
||||
head :ok
|
||||
end
|
||||
end
|
||||
class EarlyParse
|
||||
def initialize(app)
|
||||
@app = app
|
||||
end
|
||||
|
||||
def call(env)
|
||||
# Trigger a Rack parse so that env caches the query params
|
||||
Rack::Request.new(env).params
|
||||
@app.call(env)
|
||||
end
|
||||
end
|
||||
|
||||
def teardown
|
||||
TestController.last_query_parameters = nil
|
||||
@@ -111,6 +122,8 @@ class QueryStringParsingTest < ActionController::IntegrationTest
|
||||
set.draw do |map|
|
||||
map.connect ':action', :controller => "query_string_parsing_test/test"
|
||||
end
|
||||
@stack = ActionController::MiddlewareStack.new
|
||||
@stack.use(EarlyParse)
|
||||
|
||||
get "/parse", actual
|
||||
assert_response :ok
|
||||
|
||||
Reference in New Issue
Block a user