Commit b9b65b8d4e15bc7eec521b27f385ed62fb08d23f
1 parent
fa8219e0
Exists in
master
and in
4 other branches
Ensure LDAP provided email is always compared case-insensitively.
LDAP databases may store email addresses in mixed case so ensure we only work with a lower case version to avoid missing a valid account after LDAP login. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/user.rb
@@ -73,7 +73,7 @@ class User < ActiveRecord::Base | @@ -73,7 +73,7 @@ class User < ActiveRecord::Base | ||
73 | 73 | ||
74 | def self.find_for_ldap_auth(omniauth_info) | 74 | def self.find_for_ldap_auth(omniauth_info) |
75 | name = omniauth_info.name | 75 | name = omniauth_info.name |
76 | - email = omniauth_info.email | 76 | + email = omniauth_info.email.downcase |
77 | 77 | ||
78 | if @user = User.find_by_email(email) | 78 | if @user = User.find_by_email(email) |
79 | @user | 79 | @user |