使用Rails 2.3.8。
我在控制器中添加了以下内容:
filter_parameter_logging :password, :password_confirmation
但是我的生产和开发日志中仍然显示密码。请给予建议。
Processing UserSessionsController#create (for 110.159.52.119 at 2011-03-11 18:25:50) [POST]
Parameters: {"user_session"=>{"remember_me"=>"0", "password"=>"therealpassword", "login"=>"usernamehere"}, "action"=>"create", "authenticity_token"=>"kx96Yc9sF/dYbRL8UYni2tp+p/yz6CTHw+j/X6bqh/g=", "controller"=>"user_sessions"}
[paperclip] Saving attachments.
Redirected to http://abc.com/account
Completed in 2047ms (DB: 532) | 302 Found [http://abc.com/user_session]
** Erubis 2.6.6
谢谢。
filter_parameter_logging
的调用添加到了UserSessionsController
或其他控制器中?如果是,你是否重启了应用程序? - gnab