Skip to content

fix(user_ldap): skip non-string elements from ldap_explode_dn in getDomainDNFromDN - #65590

Open
pk7243959-wq wants to merge 1 commit into
nextcloud:masterfrom
pk7243959-wq:fix-ldap-dn-count
Open

pk7243959-wq wants to merge 1 commit into
nextcloud:masterfrom
pk7243959-wq:fix-ldap-dn-count

Conversation

@pk7243959-wq

Copy link
Copy Markdown
Contributor

Summary

ldap_explode_dn() returns an array containing a count key with an integer. In getDomainDNFromDN(), this integer was appended to $domainParts, resulting in an invalid DN syntax (e.g. dc=example,dc=com,4) passed to ldap_read().

This PR skips non-string elements in the loop so that getDomainDNFromDN() returns a valid domain DN.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@pk7243959-wq
pk7243959-wq requested a review from a team as a code owner October 16, 2026 18:10
@pk7243959-wq
pk7243959-wq requested review from Altahrim, CarlSchwan, leftybournes and provokateurin and removed request for a team October 16, 2026 18:10
…omainDNFromDN

Signed-off-by: pk7243959-wq <pk7243959@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: user_ldap: getDomainDNFromDN() includes count element from ldap_explode_dn(), producing invalid DN passed to ldap_read()

1 participant