fix(LDAP): lookup of AD users through objectGUID #995
Merged
+45
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when the objectguid is used in the search, it has to be encoded in a specific way. LDAP does it already, their implemengtation (\OCA\User_LDAP\Access::formatGuid2ForFilterUser) is taken over for now and the generated value passed to search.
Also for comparison, usage in the LDAP backend: https://github.com/nextcloud/server/blob/5981b7eb512aa411f51cad541d01c5c6e93476f0/apps/user_ldap/lib/Access.php#L1653-L1659
In the longer run, the LDAP API from Nextcloud should provide something, to avoid code duplication, but until that we copy the logic.