diff options
author | Nathaniel Talbott <nathaniel@terralien.com> | 2009-09-10 21:15:18 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-10 18:53:50 -0700 |
commit | f024aabee37520e8c894a83710fc121c0056dd2b (patch) | |
tree | 3e1db75e4660c399e1713a623c1d37c0d957618b /actionpack | |
parent | 38d65b03d6634b6993427213933aaa413a20c415 (diff) | |
download | rails-f024aabee37520e8c894a83710fc121c0056dd2b.tar.gz rails-f024aabee37520e8c894a83710fc121c0056dd2b.tar.bz2 rails-f024aabee37520e8c894a83710fc121c0056dd2b.zip |
Fix filtering parameters when there are Fixnum or other un-dupable values.
[#3184 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/filter_parameter_logging.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/filter_params_test.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/filter_parameter_logging.rb b/actionpack/lib/action_controller/metal/filter_parameter_logging.rb index 065e62a37f..4259d9de19 100644 --- a/actionpack/lib/action_controller/metal/filter_parameter_logging.rb +++ b/actionpack/lib/action_controller/metal/filter_parameter_logging.rb @@ -49,7 +49,7 @@ module ActionController 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 diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb index f7864745eb..19232c6bc9 100644 --- a/actionpack/test/controller/filter_params_test.rb +++ b/actionpack/test/controller/filter_params_test.rb @@ -35,6 +35,7 @@ class FilterParamTest < ActionController::TestCase 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'], |