Merge pull request #379 from presidentbeef/strip_whitespace_email_at_login

Strip whitespace from email when logging in
This commit is contained in:
Ken Johnson
2020-04-05 13:13:25 -04:00
committed by GitHub
+1 -1
View File
@@ -12,7 +12,7 @@ class SessionsController < ApplicationController
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