Navigation Menu

Skip to content

Commit

Permalink
Fix filtering parameters when there are Fixnum or other un-dupable va…
Browse files Browse the repository at this point in the history
…lues.

[#3184 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
ntalbott authored and jeremy committed Sep 11, 2009
1 parent a32eeeb commit ab9efe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/base.rb
Expand Up @@ -502,7 +502,7 @@ def filter_parameter_logging(*filter_words, &block)
end end
elsif block_given? elsif block_given?
key = key.dup key = key.dup
value = value.dup if value value = value.dup if value.duplicable?
yield key, value yield key, value
filtered_parameters[key] = value filtered_parameters[key] = value
else else
Expand Down
1 change: 1 addition & 0 deletions actionpack/test/controller/filter_params_test.rb
Expand Up @@ -18,6 +18,7 @@ def test_filter_parameters
test_hashes = [[{},{},[]], test_hashes = [[{},{},[]],
[{'foo'=>nil},{'foo'=>nil},[]], [{'foo'=>nil},{'foo'=>nil},[]],
[{'foo'=>'bar'},{'foo'=>'bar'},[]], [{'foo'=>'bar'},{'foo'=>'bar'},[]],
[{'foo'=>1},{'foo'=>1},[]],
[{'foo'=>'bar'},{'foo'=>'bar'},%w'food'], [{'foo'=>'bar'},{'foo'=>'bar'},%w'food'],
[{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'], [{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'],
[{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'], [{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'],
Expand Down

0 comments on commit ab9efe9

Please sign in to comment.