You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The given LDIF doesn't comply with RFC2849: "LDAP Data Interchange Format (LDIF) - Technical Specification"
For more details see: https://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format https://tools.ietf.org/html/rfc2849
For instance, it throws an InvalidAttributeFormatException (line 318) when the LDIF contains an attribute such as this one: company: Østfold Akershus
To workaround it, I could do one of the following:
Implement my own Utf8AttributeValidationPolicy which looks very similar to the DefaultAttributeValidationPolicy and use it in my LdifParser:
e.g. ldifParser.setAttributeValidationPolicy(new UTF8AttributeValidationPolicy());
Extend the DefaultAttributeValidationPolicy class
Option (2) should be easier and follow the open-closed OOD principal, but unfortunately in this case, the class contains only private members which can not be used in the inherited class.
So please fix the following:
Please add support for UTF-8 characters in DefaultAttributeValidationPolicy to comply with RFC2849.
Please change the members' and methods' modifiers in DefaultAttributeValidationPolicy to protected/public, so everyone will be able to extend this class.