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 38d65b0 commit f024aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -49,7 +49,7 @@ def filter_parameter_logging(*filter_words, &block)
end
elsif block_given?
key = key.dup
value = value.dup if value
value = value.dup if value.duplicable?
yield key, value
filtered_parameters[key] = value
else
Expand Down
1 change: 1 addition & 0 deletions actionpack/test/controller/filter_params_test.rb
Expand Up @@ -35,6 +35,7 @@ def test_filter_parameters
test_hashes = [[{},{},[]],
[{'foo'=>nil},{'foo'=>nil},[]],
[{'foo'=>'bar'},{'foo'=>'bar'},[]],
[{'foo'=>1},{'foo'=>1},[]],
[{'foo'=>'bar'},{'foo'=>'bar'},%w'food'],
[{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'],
[{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'],
Expand Down

0 comments on commit f024aab

Please sign in to comment.