summaryrefslogtreecommitdiff
path: root/app/controllers/profiles
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 17:00:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-26 17:00:05 +0300
commitcb74c014ea6d27314143ffd4975717b1acee607a (patch)
tree0af860105a079095ef6302c5600bdcb69b4d7761 /app/controllers/profiles
parent8f60b5b4fc9c4bc5c4e727a90b6e03acbbe70d54 (diff)
downloadgitlab-ce-cb74c014ea6d27314143ffd4975717b1acee607a.tar.gz
Key strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/keys_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb
index 6713cd7c8c7..88414b13564 100644
--- a/app/controllers/profiles/keys_controller.rb
+++ b/app/controllers/profiles/keys_controller.rb
@@ -15,7 +15,7 @@ class Profiles::KeysController < ApplicationController
end
def create
- @key = current_user.keys.new(params[:key])
+ @key = current_user.keys.new(key_params)
if @key.save
redirect_to profile_key_path(@key)
@@ -53,4 +53,9 @@ class Profiles::KeysController < ApplicationController
end
end
+ private
+
+ def key_params
+ params.require(:key).permit(:title, :key)
+ end
end