From ca5ade22f3d755ad47889e41b77d8e705b6e2ccb Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Mon, 18 Sep 2017 16:08:25 -0700 Subject: Fix `dn?` for a UID with an escaped equal sign --- spec/lib/gitlab/ldap/person_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/lib') 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 -- cgit v1.2.1