diff options
author | Patricio Cano <suprnova32@gmail.com> | 2015-12-22 21:00:41 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2015-12-22 21:23:35 +0300 |
commit | 1d3889eb465655af5f7e3e6c3af9f3f529e6c9b5 (patch) | |
tree | 2dc76089722d3f5d1bb34de44bb246ba96faf764 /lib/gitlab/ldap/user.rb | |
parent | 1cf45407d3be9e9767d27e55b6f3e2e0d8dea36f (diff) |
Fix identity and user retrieval when special characters are used
Diffstat (limited to 'lib/gitlab/ldap/user.rb')
-rw-r--r-- | lib/gitlab/ldap/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb index 4be99dd88c2..01bfe09cf07 100644 --- a/lib/gitlab/ldap/user.rb +++ b/lib/gitlab/ldap/user.rb @@ -14,7 +14,7 @@ module Gitlab # LDAP distinguished name is case-insensitive identity = ::Identity. where(provider: provider). - where('lower(extern_uid) = ?', uid.mb_chars.downcase.to_s).last + iwhere(extern_uid: uid.mb_chars.to_s).last identity && identity.user end end @@ -31,7 +31,7 @@ module Gitlab def find_by_uid_and_provider self.class.find_by_uid_and_provider( - auth_hash.uid.downcase, auth_hash.provider) + auth_hash.uid, auth_hash.provider) end def find_by_email |