sncf-connect-tech / hesperides

Configuration management tool providing universal text file templating and properties editing through a REST API or a webapp (backend part)
https://voyages-sncf-technologies.github.io/hesperides-gui/
GNU General Public License v3.0
36 stars 28 forks source link

Fix LDAP #899

Closed lenaing closed 2 months ago

lenaing commented 2 months ago

Corrige un problème de requête LDAP lors de l'utilisation de groupes avec des caractères incompatibles LDAP non échappés.

Exemple :

o.h.c.i.s.groups.LdapSearchContext       : Retries exhausted while requesting LDAP for CN=Tests (Hesperides, & co)_b43e0afd32a0

org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.core.ParseException: Encountered " "," ", "" at line 1, column 1.
Was expecting one of:
    <ATTRIBUTE_TYPE_STRING> ...
    <LDAP_OID> ...
    " " ...

    at org.springframework.ldap.core.DistinguishedName.parse(DistinguishedName.java:229)
    at org.springframework.ldap.core.DistinguishedName.<init>(DistinguishedName.java:182)
    at org.springframework.security.ldap.SpringSecurityLdapTemplate.searchForSingleEntryInternal(SpringSecurityLdapTemplate.java:270)
    at org.hesperides.core.infrastructure.security.groups.LdapSearchContext.searchCN(LdapSearchContext.java:183)