From 1ec73b5ba00f84fa732c0ea08b0eefb360969fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 2 Apr 2015 16:24:27 +0200 Subject: [PATCH] FIX: use 'request.remote_ip' instead of 'request.ip' for better consistency --- app/controllers/users_controller.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a6950cbaafe..dff0d10376d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -605,17 +605,12 @@ class UsersController < ApplicationController return false if is_api? params[:password_confirmation] != honeypot_value || - params[:challenge] != challenge_value.try(:reverse) + params[:challenge] != challenge_value.try(:reverse) end def user_params - params.permit( - :name, - :email, - :password, - :username, - :active - ).merge(ip_address: request.ip, registration_ip_address: request.ip) + params.permit(:name, :email, :password, :username, :active) + .merge(ip_address: request.remote_ip, registration_ip_address: request.remote_ip) end def fail_with(key)