Skip to content

Fix LDAP backwards compatibility

What does this MR do?

Fixes LDAP backwards compatibility in EE:

  • When config contains method key but no encryption key
  • When config encryption value is ssl or tls
  • When config does not contain verify_certificates key

Why was this MR needed?

A merge conflict seems to have been resolved incorrectly at least once. As a result, the server variable was redefined inside the loop, and assigned to the hash value at the end. But after some backwards-compatibility code was added, the assignment was placed or moved before the end of the loop, effectively skipping the backwards-compatibility code.

However, the server variable does not need to be redefined in the loop at all. This is the case in CE, and explains why backwards compatibility was only broken in EE.

Edit: Removing these lines breaks the ability to use this portion of the settings as an object rather than a Hash. It appears these lines are needed in EE, and just happened to not break CE. Will add the lines in CE as well.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36432 Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/3082

Edited by username-removed-1144264

Merge request reports