This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 3e5171265f2cf3e4495fe5824b63e8a3cae79e3c
tree 082b3455504721d7894ed07ada9f0e18ac09007f
parent 063c2574a7ffa41473f802effa92b1a41089593f parent a319ad0c8480bc10225909d7f97898dfd3989e4f
tree 082b3455504721d7894ed07ada9f0e18ac09007f
parent 063c2574a7ffa41473f802effa92b1a41089593f parent a319ad0c8480bc10225909d7f97898dfd3989e4f
merb / merb-param-protection
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
LICENSE | Thu Oct 09 10:44:13 -0700 2008 | |
| |
README | Thu Oct 09 17:35:38 -0700 2008 | |
| |
Rakefile | ||
| |
TODO | Thu Oct 09 10:44:13 -0700 2008 | |
| |
lib/ | ||
| |
script/ | Thu Oct 09 10:44:13 -0700 2008 | |
| |
spec/ |
merb-param-protection/README
merb-param-protection
=================
This plugin exposes three new controller methods which allow us to simply and flexibly filter the parameters available
within the controller.
Setup:
The request sets:
params => { :post => { :title => "ello", :body => "Want it", :status => "green", :author_id => 3, :rank => 4 } }
Example 1: params_accessable
MyController < Application
params_accessible :post => [:title, :body]
end
params.inspect # => { :post => { :title => "ello", :body => "Want it" } }
So we see that params_accessible removes everything except what is explictly specified.
Example 2: params_protected
MyOtherController < Application
params_protected :post => [:status, :author_id]
end
params.inspect # => { :post => { :title => "ello", :body => "Want it", :rank => 4 } }
We also see that params_protected removes ONLY those parameters explicitly specified.
Sometimes you have certain post parameters that are best left unlogged, we support that too. Your
actions continue to receive the variable correctly, but the requested parameters are scrubbed
at log time.
MySuperDuperController < Application
log_params_filtered :password
end
params.inspect # => { :username => 'atmos', :password => '[FILTERED]' }







