From: Tom Hughes Date: Thu, 24 Nov 2011 09:42:04 +0000 (+0000) Subject: Log any session that is reset due to a username mismatch X-Git-Tag: live~6592 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7e66fcbb1b91289f246f17947c320ce4b3fcba34 Log any session that is reset due to a username mismatch --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 44307d482..96bf915c0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,6 +19,7 @@ class ApplicationController < ActionController::Base @user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first if @user.display_name != cookies["_osm_username"] + logger.info "Session user '#{@user.display_name}' does not match cookie user '#{cookies['_osm_username']}'" reset_session @user = nil elsif @user.status == "suspended"