diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 77ee039..f62d64a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -8,6 +8,9 @@ class ApplicationController < ActionController::Base TAG_FILTER_COOKIE = :tag_filters def authenticate_user + # eagerly evaluate, in case this triggers an IpSpoofAttackError + request.remote_ip + if session[:u] && (user = User.where(:session_token => session[:u].to_s).first) && user.is_active?