Use config.filter_parameters on in-browser request dump. [#4335 state:resolved]
This commit is contained in:
parent
4c4fd1a60f
commit
eb063538bd
@ -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 ""foo"=>"[FILTERED]"", body
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user