diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-09-18 16:08:25 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-10-07 10:28:12 -0700 |
commit | ca5ade22f3d755ad47889e41b77d8e705b6e2ccb (patch) | |
tree | ed84aea812f8fe9c06e4ff39ece8d0439d38d2c1 /spec/lib/gitlab/ldap | |
parent | fee3c95d755182edd50168785789c8b954f12927 (diff) | |
download | gitlab-ce-ca5ade22f3d755ad47889e41b77d8e705b6e2ccb.tar.gz |
Fix `dn?` for a UID with an escaped equal sign
Diffstat (limited to 'spec/lib/gitlab/ldap')
-rw-r--r-- | spec/lib/gitlab/ldap/person_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/lib/gitlab/ldap/person_spec.rb b/spec/lib/gitlab/ldap/person_spec.rb index c83e2b0898e..663a6ccead1 100644 --- a/spec/lib/gitlab/ldap/person_spec.rb +++ b/spec/lib/gitlab/ldap/person_spec.rb @@ -100,12 +100,13 @@ describe Gitlab::LDAP::Person do where(:test_description, :given, :expected) do 'given a DN with a single RDN' | 'uid=John C. Smith' | true 'given a DN with multiple RDNs' | 'uid=John C. Smith,ou=People,dc=example,dc=com' | true - 'given a UID' | 'John C. Smith' | false 'given a DN with a single RDN with excess spaces' | ' uid=John C. Smith ' | true 'given a DN with multiple RDNs with excess spaces' | ' uid=John C. Smith,ou=People,dc=example,dc=com ' | true - 'given a UID with excess spaces' | ' John C. Smith ' | false 'given a DN with an escaped equal sign' | 'uid=John C. Smith,ou=People\\=' | true 'given a DN with an equal sign in escaped hex' | 'uid=John C. Smith,ou=People\\3D' | true + 'given a UID' | 'John C. Smith' | false + 'given a UID with excess spaces' | ' John C. Smith ' | false + 'given a UID with an escaped equal sign' | 'John C. \\= Smith' | false end with_them do |