Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

filter_parameter_logging creates a public controller method

#196

filter_parameter_logging creates a public method in the controllers called :filter_parameters.

This is really not nice, cause if someone use the default routes:

map.connect ':controller/:action/:id'

The www.railsapp.com/controller/filt... is exposed (and will raise a 500 error)!

Then I just added at the end of filter_parameters_logging:

self.class_eval{ protected :filter_parameters }

I don't know if it's the best work out (ideas?).

I added some tests also. =)

Reported by José Valim · May 14th, 2008 @ 06:54 PM

State: resolved
Milestone: 2.1.1
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • Milestone set to 2.1.1
    • State changed from new to open
    • Assigned user set to josh
    • Title changed from [BUG] [PATCH] filter_parameter_logging creates a public controller method to filter_parameter_logging creates a public controller method

    If you use git format patch, I can get your name and email from it so you show up as the patch author.

    May 14th, 2008 @ 07:01 PM

  2. Repository
    Repository
    • State changed from open to resolved

    (from [8d37bd08eeac6d0e94f76ac6640e288bf64595b2]) Protect #filter_parameters created by filter_parameter_logging [José Valim] [#196 state:resolved]

    http://github.com/rails/rails/co...

    May 14th, 2008 @ 07:01 PM

  3. José Valim
  4. José Valim
    José Valim

    Whoops, my additional tests were passing even if filter_parameters is not protected. =P

    I rewrote the tests.

    ps: for some strange reason, git format-patch doesn't work here.

    May 14th, 2008 @ 07:32 PM