-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDIF's DefaultAttributeValidationPolicy doesn't comply with RFC2849 - it doesn't allow UTF8 characters in attribute values #492
Comments
It seems quite reasonable to support UTF-8 characters. Would you be interested in submitting a PR for this? If we provide support for UTF-8 out of the box, I don't see a need for changing the visibility of the members/methods. I'd prefer to wait to have an explicit reason for doing this. Can you think of a concrete reason that we need to do this now? If not, then I don't think this is something we will do. If so, it might be worth considering additional improvements. |
Rob, thank you for your quick response. Changing the visibility of the members and methods is an easy and intuitive solution: I'd be happy to submit a pull request, please let me know which fix fits here (after considering my examples above): (1) or (2), or both... Naor |
I'd prefer to wait on exposing DefaultAttributeValidationPolicy members until we have a real use case to solve. Breaking encapsulation makes the code harder to maintain and breaking it before we have real solutions often leads to the wrong solution. I'd be glad to accept a PR for UTF-8 support as this is something that is concrete. |
…tes values for LDIF's DefaultAttributeValidationPolicy in order to comply with RFC2849
Thank you, Rob. |
…LDIF's DefaultAttributeValidationPolicy in order to comply with RFC2849
Closed in 177b4bb |
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:
e.g.
ldifParser.setAttributeValidationPolicy(new UTF8AttributeValidationPolicy());
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:
Thank you,
Naor
The text was updated successfully, but these errors were encountered: