Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit ab9efe9e165ea1e8a8dc37287deea4439d3fbc05 1 parent a32eeeb
@ntalbott ntalbott authored jeremy committed
View
2  actionpack/lib/action_controller/base.rb
@@ -502,7 +502,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
@@ -18,6 +18,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'],
Please sign in to comment.
Something went wrong with that request. Please try again.