This project is archived and is in readonly mode.
filter_parameter_logging fails with scalar values in an array
-
Michael Koziarski
- Milestone changed from 2.x to 2.3.4
- Assigned user set to Michael Koziarski
Targeting 2.3.4 for this
-
Sebastian Delmont
Slightly better patch that allows for nested arrays and hashes. It also includes tests that fail.
-
Sebastian Delmont
Technically, it fails when the values within the array are not enumerable.
The error didn't surface during testing because param values are always strings under normal conditions.
Only when testing controllers with params including arrays of integers (for example) you run into this issue.
A quick workaround is to convert to strings any non-string parameters in your tests.
-
Simone Carletti
The same here. This issue blocks me from upgrading to Rails 2.3.3.
With Rails 2.3.3 I have more than 10 failing tests.
I confirm that the bug has been introduced with http://github.com/rails/rails/commit/9407f6e9a428b37517fdd779eac15e.... Reverting the commit causes the tests to pass again. -
Michael Koziarski
Simone, does this patch fix your problem also?
-
Simone Carletti
Hi Michael,
with the second path my tests passes again.I've got a couple of failure compared with Rails 2.3.2, but they don't seem to be related to this specific issue but with more probability to an incompatible GEM. That said, I'm confident to confirm Sebastian's patch successfully fixes the bugfix.
-
Repository
- State changed from new to committed
(from [ead5d88bf178b8a32d151747a42df2aafa57eeaa]) Fix filter_parameter_logging of non-hash values within array params
Signed-off-by: Michael Koziarski michael@koziarski.com
[#2927 filter_parameter_logging fails with scalar values in an array state:committed] http://github.com/rails/rails/commit/ead5d88bf178b8a32d151747a42df2...
