|
This is a real problem, but we can fix it fast.
What are our options here ? 1) Just don't take the responsability of detecting bad DN in ASN.1 codec. Then we will send the created DN to the next layer 2) Assume that we test that the DN syntax is valid, but we must throw an error allowing the client to be informed of the cause of the error. I personnaly assumed that the second solution was better, in a sense that I build a LdapDN (it should be renamed LdapName), which internally contains RDN. So an invalid DN will lead top incorrect inner structure. That was a choice, of course. The alternative was to store the String, instead of building a valid DN. However, in this case, the thrown exception is not good. May be wa can throw a specific exception for that purpose, but that mean a special handling in the protocol layer. I'm not totally happy with that solution. An other way to go is to set a flag to tell the MessageHandler that the DN was incorrect. Or simply forget about the control, and just store the value as it, without parsing it. We just have to add a method to store this UP name into a ldapDN. wdyt is best ? I think the best way to approach this problem is as we discussed. Let's make a special message type handler and register it for Exceptions. Instead of propagating exceptions by throwing them we can bubble up the message to this handler which can properly respond to the client.
It's exactly the same issue. we will keep 711 alive. We have a fix now, but it must be applied.
Emmanuel is currently working on this issue.
This is
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http://svn.apache.org/viewcvs.cgi/directory/trunks/apacheds/simple/unit/src/test/java/org/apache/ldap/server/BadDnTest.java?rev=374520&view=markup