On 2/2/21 2:56 AM, radiatejava wrote:
On Sun, Jan 31, 2021 at 5:49 PM Howard Chu hyc@symas.com wrote:
That is not a valid encoding for LDAP. Read RFC4511.
Thanks for responding but did not get you fully. RFC 4511 talks about BER and ASN.1 encodings but here my issue with the actual value or the data. BER and ASN.1 encoding should be taken care by the ldap client library right?
Right.
For me it works fine when I hard code the DN to CN=mithun,OU=Groupes de S\u00e9curit\u00e9,DC=insaaadev,DC=net.
Have a look at definition of valid LDAP string representations:
https://tools.ietf.org/html/rfc4514
It is just that when the same value is coming from frontend, it is not working.
Fix your frontend. It seems to send a runtime-specific string representation which is a not valid DN string representation as per RFC 4514.
If you do not mind, can you please tell me what should be the encoded value for CN=mithun,OU=Groupes de Sécurité,DC=mytest,DC=net ?
If you encode
CN=mithun,OU=Groupes de Sécurité,DC=mytest,DC=net
as valid UTF-8 everything should be just fine. At minimum you must properly escape some special chars when generating DN parts from arbitrary input values. Most LDAP libraries have decent functions for this.
Ciao, Michael.