Skip to content

[LDAP] No error description on search failure #28149

@scaytrase

Description

@scaytrase

Symfony version(s) affected: 4.1, 3.4

Description
When query fails due to LDAP misconfiguration, i.e invalid query filter, we ran into Could not complete search with dn exception statement, which gives us no clue, how to resolve this problem.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php#L92

In order to resolve it you should manually dig with debugging what happens there and manually use ldap_error and ldap_errno to discover the actual problem.

How to reproduce
Configure improper filter string for LDAP (i.e wrap it with double quotes, in my case)

Possible Solution
Enrich exception with ldap_error and ldap_errno output if present

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions