1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Lucas Mazza
e79201aef8
Remove deprecated ParameterSanitizer API. 2016-05-03 18:32:47 -03:00
Lucas Mazza
2040b021e1
Extend the deprecation horizon for the ParameterSanitizer and the OmniAuth helpers. 2016-04-29 16:20:01 -03:00
Lucas Mazza
db901399f2 Fix Symbol syntax no deprecation message. 2016-03-09 15:59:00 -03:00
Lucas Mazza
ffe9d6d406 Fix Symbol syntax on ParameterSanitizer deprecation message. 2016-01-28 11:10:15 -02:00
Lucas Mazza
b91bbb1590 Tweak ParameterSanitizer exception/deprecation messages. 2016-01-18 13:51:51 -02:00
Lucas Mazza
6431445846 Cast the result of deperecated sanitization calls to a HWIA as well. 2015-12-21 09:57:20 -02:00
Lucas Mazza
df8b48646b Remove ParametersSanitizer inheritance.
We no longer need to support the `BaseSanitizer` implementation for apps without
the Strong Parameters API, and this section is lacking a minimal set of
docs to document the expected behavior besides the `README` section.
2015-12-18 11:39:03 -02:00
José Valim
9eb0768cb9 Add Rails 4 related todo 2013-10-31 14:40:44 +01:00
José Valim
e445039716 Merge pull request #2717 from memberful/2716-splat-sanitize-params
Splat the arguments to strong_parameters#permit, fixes #2716
2013-10-31 14:40:28 +01:00
José Valim
efe34219a9 Fix the build on Rails 3.2 2013-08-12 15:36:41 +02:00
José Valim
4e318b5167 Simplify parameter sanitization proposal 2013-08-11 22:20:59 +02:00
Alex Peattie
5e7caffc9e Extend params sanitizer, to make it easier to add/remove permitted params
- Move the default permitted parameters into ParameterSanitizer::PermittedParameters
- Add devise_permitted_parameters helper
- devise_permitted_parameters.add to add permitted parameters
- devise_permitted_parameters.remove to remove Devise's defaults
- devise_permitted_parameters.for to access the parameters for a given action
- Update 'Strong Parameters' section of README

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2013-08-11 22:20:59 +02:00
Vasiliy Ermolovich
2c1ca126f4 add remember_me to the permitted sign_in params 2013-07-12 22:14:32 +03:00
Drew Ulmer
e029ad7b0c Fix improper login param sanitization permit
This includes a failing test case that hooks into ActiveSupport
Notifications to catch the param permit error.
2013-06-25 13:44:39 -05:00
José Valim
5717c6f082 Splat args to be sanitized 2013-06-19 10:37:37 +02:00
José Valim
8a93c34080 Clean up Devise parameter sanitizer 2013-04-13 23:21:46 -07:00
Drew Ulmer
d20fdf87b6 Introduce BaseSanitizer null sanitizer and controller-specific callbacks
This updates Devise's StrongParameter support to feature:

- A Null base sanitizer to support existing Rails 3.x installations that
  don't want to use StrongParameters yet
- A new, simpler API for ParameterSanitizer: #permit, #permit!, and #forbid
- Overrideable callbacks on a controller-basis, e.g. #create_sessions_params
  for passing the current scope's parameters through StrongParameters and
  a helper method, whitelisted_params, for rolling your own implementations
  of #create_x_params in your own controllers.
- Lots of tests!
2013-04-10 10:33:50 -05:00
Drew Ulmer
78f137368c Add support for Rails 4 strong_parameters
This brings support for Rails 4 StrongParameters changes.

- Parameter sanitizing is setup for Devise controllers via
  resource_params except Omniauth Callbacks which doesn't use
  resource_params.

- Change #build_resource to not call resource_params for get requests.
  Parameter sanitizing is only needed when params are posted to the
  server so there's no need to try to construct resource params on get
  requests (new, edit).
2013-03-31 21:31:48 -05:00