summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-24 12:37:46 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-24 12:37:46 +0100
commit662aa8ec35a2c1a898ade5be3a525591786cd9f5 (patch)
treebc37ef011b7af38d1ab76dff5b5a2225656c2c8f
parent1d3889eb465655af5f7e3e6c3af9f3f529e6c9b5 (diff)
downloadgitlab-ce-ldap-special-chars-fix.tar.gz
No mb_chars needed anymoreldap-special-chars-fix
-rw-r--r--lib/gitlab/ldap/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb
index 01bfe09cf07..aef08c97d1d 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).
- iwhere(extern_uid: uid.mb_chars.to_s).last
+ iwhere(extern_uid: uid).last
identity && identity.user
end
end
@@ -47,7 +47,7 @@ module Gitlab
# find_or_initialize_by doesn't update `gl_user.identities`, and isn't autosaved.
identity = gl_user.identities.find { |identity| identity.provider == auth_hash.provider }
identity ||= gl_user.identities.build(provider: auth_hash.provider)
-
+
# For a new user set extern_uid to the LDAP DN
# For an existing user with matching email but changed DN, update the DN.
# For an existing user with no change in DN, this line changes nothing.