提交 eb063538 编写于 作者: J José Valim

Use config.filter_parameters on in-browser request dump. [#4335 state:resolved]

上级 4c4fd1a6
......@@ -6,7 +6,7 @@
<% end %>
<%
clean_params = @request.parameters.clone
clean_params = @request.filtered_parameters.clone
clean_params.delete("action")
clean_params.delete("controller")
......
......@@ -106,4 +106,13 @@ class ShowExceptionsTest < ActionController::IntegrationTest
assert_response 405
assert_match /ActionController::MethodNotAllowed/, body
end
test "does not show filtered parameters" do
@app = DevelopmentApp
get "/", {"foo"=>"bar"}, {'action_dispatch.show_exceptions' => true,
'action_dispatch.parameter_filter' => [:foo]}
assert_response 500
assert_match "&quot;foo&quot;=&gt;&quot;[FILTERED]&quot;", body
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册