AD Auth failing due to parenthesis

Hello dear Community!

I’m looking for your help regarding the use of the authentication through AD.

I’m able to set it up correctly and use it. But I encounter an issue when I try to use Groups that are contained in an OU which contains parenthesis.

A little example:

Using this DN:
CN=mygroup,OU=LocalGroup(Permissions),ou=company,dc=company,dc=tld

the filter used when I use ./scripts/auth_test.php -l -v is incorrect. Indeed, the filter generated uses () which leads to an incorrect filter. It should use OU=LocalGroup\28Permissions\29 instead of OU=LocalGroup(Permissions).

I did not find any solution yet to provide my own filter for the group access part to bypass this issue.

When using a DN without parenthesis it works great.

Any chance there’s a fix or some way to make this happen?

Thanks a lot! I’ll be available in case something is not clear.

(This RFC talks about the support of escaping parenthesis for ldap filters. https://www.rfc-editor.org/rfc/rfc2254.txt)

Robin