Downcase LDAP DNs before storing
We should consider downcasing (and Net::LDAP::DN
). Comparing DNs in Ruby can be tricky because it's case-insensitive (AND apparently, whitespace insensitive).
This very similar to https://gitlab.com/gitlab-org/gitlab-ee/issues/365. We chose not to tackle this at that time because it's a fairly high risk change. Now it seems it's caught up to us and we need to do it. We need to be extremely careful though so we don't break part of LDAP or LDAP group sync.
This change will undoubtedly have EE component changes as well. We will need a migration or plan to fix existing identities, too.