Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8422 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Exception when params value is nil AND filter_parameter_logging is used with Block

Reported by: choonkeat Assigned to: core
Priority: normal Milestone: 1.x
Component: ActionPack Version: edge
Severity: normal Keywords:
Cc:

Description

When invoking URLs like http://host/path?key , the params hash is

{ :key => nil }

This is fine, except ActionController::Base#filter_parameter_logging method does a value.dup when used with a block. This causes unnecessary exception whilst printing Parameters: to the log.

can't dup NilClass

Attachments

filter_params_value_nil.patch (1.1 kB) - added by choonkeat on 05/21/07 11:39:58.
code AND unit test patch to ActionController::Base

Change History

05/21/07 11:39:58 changed by choonkeat

  • attachment filter_params_value_nil.patch added.

code AND unit test patch to ActionController::Base

05/21/07 23:01:21 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [6802]) Fix filtered parameter logging with nil parameter values. Closes #8422.

05/21/07 23:04:18 changed by bitsweat

(In [6803]) Merge [6802] to stable: fix filtered parameter logging with nil parameter values. References #8422.