Skip to content

Commit

Permalink
Strip whitespace from email when logging in
Browse files Browse the repository at this point in the history
Makes it a little easier to copy-paste credentials
  • Loading branch information
presidentbeef committed Mar 25, 2020
1 parent 70d4144 commit 6acf74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6acf74a

Please sign in to comment.