-
Couldn't load subscription status.
- Fork 5.5k
Open
Description
Problem
The Devise::PasswordsController uses unsanitized resource_params during password reset, which could lead to security issues.
Proposal
- Add a new
:reset_passwordaction to the DEFAULT_PERMITTED_ATTRIBUTES
DEFAULT_PERMITTED_ATTRIBUTES = {
sign_in: [:password, :remember_me],
sign_up: [:password, :password_confirmation],
account_update: [:password, :password_confirmation, :current_password]
reset_password: [:reset_password_token, :password, :password_confirmation]
}- Use it in the
Devise::PasswordsController.
def resource_params
devise_parameter_sanitizer.sanitize(:reset_password)
endThis will ensure the parameters used in the Devise::PasswordsControllerare sanitized, maintaining consistency with other controllers like RegistrationController and SessionController.
Metadata
Metadata
Assignees
Labels
No labels