From 6acf74aa350a58adea5f4370dc6eee5e2543164e Mon Sep 17 00:00:00 2001 From: Justin Collins Date: Wed, 25 Mar 2020 11:22:20 -0700 Subject: [PATCH] Strip whitespace from email when logging in Makes it a little easier to copy-paste credentials --- app/controllers/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 203f1165b..3221cb45a 100755 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -12,7 +12,7 @@ def create path = params[:url].present? ? params[:url] : home_dashboard_index_path begin # Normalize the email address, why not - user = User.authenticate(params[:email].to_s.downcase, params[:password]) + user = User.authenticate(params[:email].to_s.strip.downcase, params[:password]) rescue RuntimeError => e # don't do ANYTHING end