Rails 2.1.0, filter_parameter_logging crashes exception_notifiable
Reported by JackC | June 4th, 2008 @ 04:48 PM
ActionView::TemplateError (protected method `filter_parameters' called for #) on line #3 of vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml:
1: * URL : <%= @request.protocol %><%= @host %><%= @request.request_uri %>
2: * IP address: <%= @request.env["HTTP_X_FORWARDED_FOR"] || @request.env["REMOTE_ADDR"] %>
3: * Parameters: <%= filter_sensitive_post_data_parameters(@request.parameters).inspect %>
4: * Rails root: <%= @rails_root %>
It appears that filter_parameters is protected in Rails 2.1.0. @controller.filter_parameters is called in exception_notifier_helper.rb on lines 70 and 76.
Altering it to use send seems to make it work. Not sure what the proper fix would be.
Comments and changes to this ticket
-
-
Yong Bakos July 2nd, 2008 @ 11:39 PM
- → Tag changed from to exception_notifiable
- → Assigned user changed from to Michael Koziarski
I too can confirm this bug.
-
Yong Bakos July 2nd, 2008 @ 11:59 PM
Making Michael's suggested change yielded another error.
ActionView::TemplateError (protected method `filter_parameters' called for #) on line #3 of vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml:
1: <% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%>
2: <% @request.env.keys.sort.each do |key| -%>
3: * <%= "%-*s: %s" % [max.length, key, filter_sensitive_post_data_from_env(key, @request.env[key].to_s.strip)] %>
4: <% end -%>
-
Yong Bakos July 3rd, 2008 @ 12:04 AM
Also fixed similarly as above, this time on exception_notifier_helper line 76:
From:
return @controller.filter_parameters({env_key => env_value}).values[0]
To:
return @controller.send(:filter_parameters, {env_key => env_value}).values[0]
-
-
ramstedt (at auktionskompaniet) July 3rd, 2008 @ 02:51 PM
- no changes were found...
-
-
Michael Koziarski July 6th, 2008 @ 07:32 PM
- → State changed from new to resolved
This has been fixed in git for a while
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
