From ddd97f3c91c880d78846b72f7d9cb6c6a5dda5e7 Mon Sep 17 00:00:00 2001 From: Keifer Furzland <kfrz.code@gmail.com> Date: Sun, 26 Mar 2017 01:47:10 +0000 Subject: [PATCH] Update wikis_controller.rb to use strong params --- app/controllers/projects/wikis_controller.rb | 2 +- .../23363-use-strong-params-in-wikis-controller.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/23363-use-strong-params-in-wikis-controller.yml diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index f210f7e61d2..c5e24b9e365 100644 --- a/app/controllers/projects/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -124,6 +124,6 @@ class Projects::WikisController < Projects::ApplicationController end def wiki_params - params[:wiki].slice(:title, :content, :format, :message) + params.require(:wiki).permit(:title, :content, :format, :message) end end diff --git a/changelogs/unreleased/23363-use-strong-params-in-wikis-controller.yml b/changelogs/unreleased/23363-use-strong-params-in-wikis-controller.yml new file mode 100644 index 00000000000..dd342d38fef --- /dev/null +++ b/changelogs/unreleased/23363-use-strong-params-in-wikis-controller.yml @@ -0,0 +1,4 @@ +--- +title: Update wikis_controller.rb to use strong params +merge_request: +author: -- GitLab