summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-09-20 15:05:25 -0700
committerMichael Kozono <mkozono@gmail.com>2017-10-07 10:28:12 -0700
commitc79879f33a05494f2ae5785a663b874bf8e42655 (patch)
tree0107474fe462e5bcf7da50bc25ccc8b692185406 /lib
parente65bf3fa63ae45aaf9600cffb50be58eee9023db (diff)
downloadgitlab-ce-c79879f33a05494f2ae5785a663b874bf8e42655.tar.gz
Fix escaped equal signs
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ldap/dn.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/ldap/dn.rb b/lib/gitlab/ldap/dn.rb
index c23fac2d57a..554156142cc 100644
--- a/lib/gitlab/ldap/dn.rb
+++ b/lib/gitlab/ldap/dn.rb
@@ -218,10 +218,12 @@ module Gitlab
self.class.new(*to_a).to_s
end
- # http://tools.ietf.org/html/rfc2253 section 2.4 lists these exceptions
- # for dn values. All of the following must be escaped in any normal string
- # using a single backslash ('\') as escape.
- NORMAL_ESCAPES = [',', '+', '"', '\\', '<', '>', ';']
+ # https://tools.ietf.org/html/rfc4514 section 2.4 lists these exceptions
+ # for DN values. All of the following must be escaped in any normal string
+ # using a single backslash ('\') as escape. The space character is left
+ # out here because in a "normalized" string, spaces should only be escaped
+ # if necessary (i.e. leading or trailing space).
+ NORMAL_ESCAPES = [',', '+', '"', '\\', '<', '>', ';', '=']
# Compiled character class regexp using the keys from the above hash, and
# checking for a space or # at the start, or space at the end, of the