Skip to content
Browse files

Fix filtering parameters when there are Fixnum or other un-dupable va…

…lues.

[#3184 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 38d65b0 commit f024aabee37520e8c894a83710fc121c0056dd2b @ntalbott ntalbott committed with jeremy
View
2 actionpack/lib/action_controller/metal/filter_parameter_logging.rb
@@ -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
View
1 actionpack/test/controller/filter_params_test.rb
@@ -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'],

0 comments on commit f024aab

Please sign in to comment.
Something went wrong with that request. Please try again.