Skip to content

Refactor the files_controller.rb to use the strong parameters pattern. #4190

@euler-room

Description

@euler-room

The Files controller is not vetting incoming parameters. They are accessed throughout the file using params[:my_param]. This raises a some security concerns.

Acceptance Criteria:

  • Creates an action specific strong parameter method for each action:
def my_action_params
  params.permit(:id, :path, :etc)
end
  • Removes all instances of params[:blah_blah]
  • Loads params into the appropriate variable type for its use case (instance, local, etc)
  • Passes variables into shared methods

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions