diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-09-09 18:48:55 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-09 20:12:58 +0100 |
commit | b02b0d639e4921278e99fb314cc79e98362b1880 (patch) | |
tree | 71998e97ffbe5166ea6192761b9924fdb1bc70b5 /app/controllers | |
parent | 558c6e8ef9d10517725f0c88cc7c63b00c2af0e9 (diff) |
Whitelist user controller signup params0.7.0.8hotfix/0.7.0.8
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/user_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 4ee527bae..30f8700a5 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -192,7 +192,7 @@ class UserController < ApplicationController work_out_post_redirect @request_from_foreign_country = country_from_ip != Configuration::iso_country_code # Make the user and try to save it - @user_signup = User.new(params[:user_signup]) + @user_signup = User.new(user_params(:user_signup)) error = false if @request_from_foreign_country && !verify_recaptcha flash.now[:error] = _("There was an error with the words you entered, please try again.") @@ -593,6 +593,10 @@ class UserController < ApplicationController private + def user_params(key = :user) + params[key].slice(:name, :email, :password, :password_confirmation) + end + def is_modal_dialog (params[:modal].to_i != 0) end |