Ludovic Poitou created DIRSTUDIO-1172:
-----------------------------------------

             Summary: Studio doesn't display entries due to Invalid DN 
exception, but DN is compliant with RFC4514.
                 Key: DIRSTUDIO-1172
                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1172
             Project: Directory Studio
          Issue Type: Bug
    Affects Versions: 2.0.0-M13
            Reporter: Ludovic Poitou


We're pointing Directory Studio to an instance of OpenDJ, with valid entries, 
and none of the entries under a node are displayed.

DNs are in the form of uid=nghZwwtHgxgyvVbTQCYyeY\+O4cc=,dc=example,dc=com

It seems that it's the last = sign of the value that is triggering the error.

RFC 4514 doesn't require to escape the "=" character when converting from DN to 
String representation. 

The error log shows the following stack trace:
{noformat}
org.apache.mina.filter.codec.ProtocolDecoderException: 
org.apache.directory.api.ldap.codec.api.ResponseCarryingException: The Dn 0x63 
0x6F 0x72 0x65 0x54 0x6F 0x6B 0x65 0x6E 0x49 0x64 0x3D 0x6E 0x67 0x68 0x5A 0x77 
0x77 0x74 0x48 0x67 0x78 0x67 0x79 0x76 0x56 0x62 0x54 0x51 0x43 0x59 0x79 0x65 
0x59 0x5C 0x2B 0x4F 0x34 0x63 0x63 0x3D 0x2C 0x6F 0x75 0x3D 0x66 0x61 0x6D 0x72 
0x65 0x63 0x6F 0x72 0x64 0x73 0x2C 0x6F 0x75 0x3D 0x6F 0x70 0x65 0x6E 0x61 0x6D 
0x2D 0x73 0x65 0x73 0x73 0x69 0x6F 0x6E 0x2C 0x6F 0x75 0x3D 0x74 0x6F 0x6B 0x65 
0x6E 0x73 0x2C 0x64 0x63 0x3D 0x6F 0x70 0x65 0x6E 0x61 0x6D 0x2C 0x64 0x63 0x3D 
0x66 0x6F 0x72 0x67 0x65 0x72 0x6F 0x63 0x6B 0x2C 0x64 0x63 0x3D 0x6F 0x72 0x67 
is invalid : ERR_04215 Unescaped special characters are not allowed (Hexdump: 
30 81 BA 02 01 12 64 81 B4 04 71 63 6F 72 65 54 6F 6B 65 6E 49 64 3D 6E 67 68 
5A 77 77 74 48 67 78 67 79 76 56 62 54 51 43 59 79 65 59 5C 2B 4F 34 63 63 3D 
2C 6F 75 3D 66 61 6D 72 65 63 6F 72 64 73 2C 6F 75 3D 6F 70 65 6E 61 6D 2D 73 
65 73 73 69 6F 6E 2C 6F 75 3D 74 6F 6B 65 6E 73 2C 64 63 3D 6F 70 65 6E 61 6D 
2C 64 63 3D 66 6F 72 67 65 72 6F 63 6B 2C 64 63 3D 6F 72 67 30 3F 30 21)
        at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:240)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
        at 
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
        at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
        at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
        at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
        at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
        at 
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
        at 
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.directory.api.ldap.codec.api.ResponseCarryingException: 
The Dn 0x63 0x6F 0x72 0x65 0x54 0x6F 0x6B 0x65 0x6E 0x49 0x64 0x3D 0x6E 0x67 
0x68 0x5A 0x77 0x77 0x74 0x48 0x67 0x78 0x67 0x79 0x76 0x56 0x62 0x54 0x51 0x43 
0x59 0x79 0x65 0x59 0x5C 0x2B 0x4F 0x34 0x63 0x63 0x3D 0x2C 0x6F 0x75 0x3D 0x66 
0x61 0x6D 0x72 0x65 0x63 0x6F 0x72 0x64 0x73 0x2C 0x6F 0x75 0x3D 0x6F 0x70 0x65 
0x6E 0x61 0x6D 0x2D 0x73 0x65 0x73 0x73 0x69 0x6F 0x6E 0x2C 0x6F 0x75 0x3D 0x74 
0x6F 0x6B 0x65 0x6E 0x73 0x2C 0x64 0x63 0x3D 0x6F 0x70 0x65 0x6E 0x61 0x6D 0x2C 
0x64 0x63 0x3D 0x66 0x6F 0x72 0x67 0x65 0x72 0x6F 0x63 0x6B 0x2C 0x64 0x63 0x3D 
0x6F 0x72 0x67 is invalid : ERR_04215 Unescaped special characters are not 
allowed
        at 
org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolDecoder.decode(LdapProtocolDecoder.java:177)
        at 
org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolDecoder.decode(LdapProtocolDecoder.java:93)
        at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:231)
        ... 15 more
Caused by: org.apache.directory.api.asn1.DecoderException: The Dn 0x63 0x6F 
0x72 0x65 0x54 0x6F 0x6B 0x65 0x6E 0x49 0x64 0x3D 0x6E 0x67 0x68 0x5A 0x77 0x77 
0x74 0x48 0x67 0x78 0x67 0x79 0x76 0x56 0x62 0x54 0x51 0x43 0x59 0x79 0x65 0x59 
0x5C 0x2B 0x4F 0x34 0x63 0x63 0x3D 0x2C 0x6F 0x75 0x3D 0x66 0x61 0x6D 0x72 0x65 
0x63 0x6F 0x72 0x64 0x73 0x2C 0x6F 0x75 0x3D 0x6F 0x70 0x65 0x6E 0x61 0x6D 0x2D 
0x73 0x65 0x73 0x73 0x69 0x6F 0x6E 0x2C 0x6F 0x75 0x3D 0x74 0x6F 0x6B 0x65 0x6E 
0x73 0x2C 0x64 0x63 0x3D 0x6F 0x70 0x65 0x6E 0x61 0x6D 0x2C 0x64 0x63 0x3D 0x66 
0x6F 0x72 0x67 0x65 0x72 0x6F 0x63 0x6B 0x2C 0x64 0x63 0x3D 0x6F 0x72 0x67 is 
invalid : ERR_04215 Unescaped special characters are not allowed
        at 
org.apache.directory.api.ldap.codec.actions.searchResultEntry.StoreSearchResultEntryObjectName.action(StoreSearchResultEntryObjectName.java:95)
        at 
org.apache.directory.api.ldap.codec.actions.searchResultEntry.StoreSearchResultEntryObjectName.action(StoreSearchResultEntryObjectName.java:46)
        at 
org.apache.directory.api.asn1.ber.grammar.AbstractGrammar.executeAction(AbstractGrammar.java:139)
        at 
org.apache.directory.api.asn1.ber.Asn1Decoder.treatTLVDoneState(Asn1Decoder.java:600)
        at 
org.apache.directory.api.asn1.ber.Asn1Decoder.decode(Asn1Decoder.java:736)
        at 
org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolDecoder.decode(LdapProtocolDecoder.java:144)
        ... 17 more
Caused by: 
org.apache.directory.api.ldap.model.exception.LdapInvalidDnException: ERR_04215 
Unescaped special characters are not allowed
        at 
org.apache.directory.api.ldap.model.name.ComplexDnParser.parseDn(ComplexDnParser.java:56)
        at 
org.apache.directory.api.ldap.model.name.Dn.parseInternal(Dn.java:1443)
        at org.apache.directory.api.ldap.model.name.Dn.<init>(Dn.java:294)
        at org.apache.directory.api.ldap.model.name.Dn.<init>(Dn.java:217)
        at 
org.apache.directory.api.ldap.codec.actions.searchResultEntry.StoreSearchResultEntryObjectName.action(StoreSearchResultEntryObjectName.java:87)
        ... 22 more
Caused by: java.lang.IllegalArgumentException: ERR_04215 Unescaped special 
characters are not allowed
        at 
org.apache.directory.api.ldap.model.name.Rdn.unescapeValue(Rdn.java:1360)
        at 
org.apache.directory.api.ldap.model.name.AntlrDnParser.attributeTypeAndValue(AntlrDnParser.java:492)
        at 
org.apache.directory.api.ldap.model.name.AntlrDnParser.relativeDistinguishedName(AntlrDnParser.java:237)
        at 
org.apache.directory.api.ldap.model.name.AntlrDnParser.relativeDistinguishedNames(AntlrDnParser.java:302)
        at 
org.apache.directory.api.ldap.model.name.ComplexDnParser.parseDn(ComplexDnParser.java:52)
        ... 26 more{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to