diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-13 19:08:47 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-02-13 19:08:47 +0000 |
commit | 7f8abaebd91b190b5239a2f302277ace139aa2e6 (patch) | |
tree | 6c0e99989aaa270aa43807ffdb1f76b184045eb1 /lib | |
parent | dd8f56e86296f8ba6769075ef6bc6e28264706b6 (diff) | |
parent | b45c7dd5fecd33d1fbc9053cb353d7ed0c6d57dd (diff) | |
download | gitlab-ce-7f8abaebd91b190b5239a2f302277ace139aa2e6.tar.gz |
Merge branch 'remove_ldap_person_validation' into 'master'
Remove problematic LDAP::Person validation for new strategy
Closes #42412 and #42359
See merge request gitlab-org/gitlab-ce!16727
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ldap/person.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/gitlab/ldap/person.rb b/lib/gitlab/ldap/person.rb index b91757c2a4b..c59df556247 100644 --- a/lib/gitlab/ldap/person.rb +++ b/lib/gitlab/ldap/person.rb @@ -63,8 +63,6 @@ module Gitlab Rails.logger.debug { "Instantiating #{self.class.name} with LDIF:\n#{entry.to_ldif}" } @entry = entry @provider = provider - - validate_entry end def name @@ -117,19 +115,6 @@ module Gitlab entry.public_send(selected_attr) # rubocop:disable GitlabSecurity/PublicSend end - - def validate_entry - allowed_attrs = self.class.ldap_attributes(config).map(&:downcase) - - # Net::LDAP::Entry transforms keys to symbols. Change to strings to compare. - entry_attrs = entry.attribute_names.map { |n| n.to_s.downcase } - invalid_attrs = entry_attrs - allowed_attrs - - if invalid_attrs.any? - raise InvalidEntryError, - "#{self.class.name} initialized with Net::LDAP::Entry containing invalid attributes(s): #{invalid_attrs}" - end - end end end end |