Skip to content

Commit

Permalink
Use config.filter_parameters on in-browser request dump. [#4335 state…
Browse files Browse the repository at this point in the history
…:resolved]
  • Loading branch information
josevalim committed Apr 6, 2010
1 parent 4c4fd1a commit eb06353
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Expand Up @@ -6,7 +6,7 @@
<% end %>
<%
clean_params = @request.parameters.clone
clean_params = @request.filtered_parameters.clone
clean_params.delete("action")
clean_params.delete("controller")

Expand Down
9 changes: 9 additions & 0 deletions actionpack/test/dispatch/show_exceptions_test.rb
Expand Up @@ -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

0 comments on commit eb06353

Please sign in to comment.