summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-09-18 16:08:25 -0700
committerMichael Kozono <mkozono@gmail.com>2017-10-07 10:28:12 -0700
commitca5ade22f3d755ad47889e41b77d8e705b6e2ccb (patch)
treeed84aea812f8fe9c06e4ff39ece8d0439d38d2c1 /lib
parentfee3c95d755182edd50168785789c8b954f12927 (diff)
downloadgitlab-ce-ca5ade22f3d755ad47889e41b77d8e705b6e2ccb.tar.gz
Fix `dn?` for a UID with an escaped equal sign
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ldap/person.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/person.rb b/lib/gitlab/ldap/person.rb
index a4954c3fd71..ca96a099714 100644
--- a/lib/gitlab/ldap/person.rb
+++ b/lib/gitlab/ldap/person.rb
@@ -50,7 +50,7 @@ module Gitlab
# An empty string is technically a valid DN (null DN), although we should
# never need to worry about that.
def self.dn?(uid_or_dn)
- uid_or_dn.blank? || uid_or_dn.include?('=')
+ uid_or_dn.blank? || !!uid_or_dn.match(/(?<!\\)=/)
end
# Returns the UID in a normalized form.