You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Enrique Rodriguez (JIRA)" <di...@incubator.apache.org> on 2005/10/23 08:42:22 UTC

[jira] Closed: (DIREVE-282) Attribute names with periods cannot be used in a search filter.

     [ http://issues.apache.org/jira/browse/DIREVE-282?page=all ]
     
Enrique Rodriguez closed DIREVE-282:
------------------------------------


No point in violating RFC 2251, since I don't plan to use periods in attribute names, anyway.  I filed this since it appeared the JDK supported it.

> Attribute names with periods cannot be used in a search filter.
> ---------------------------------------------------------------
>
>          Key: DIREVE-282
>          URL: http://issues.apache.org/jira/browse/DIREVE-282
>      Project: Directory Server
>         Type: Bug
>   Components: jndi-provider
>     Reporter: Enrique Rodriguez
>     Assignee: Alex Karasulu

>
> The following filter fails in a DirContext.search(), but it works fine in the JDK (test cases are below):
> String filter = "(service.Pid=org.apache.dns.factory)";
> javax.naming.directory.InvalidSearchFilterException: Encountered parse exception while parsing the filter: '(service.Pid=org.apache.dns.factory)' [Root exception is java.text.ParseException: Parser failure on filter:
> 	(service.Pid=org.apache.dns.factory)
> Antlr exception trace:
> unexpected char: '.']
> 	at org.apache.ldap.server.jndi.ServerDirContext.search(ServerDirContext.java:598)
> 	at org.apache.ldap.server.jndi.ServerDirContext.search(ServerDirContext.java:559)
> ...
> Caused by: java.text.ParseException: Parser failure on filter:
> 	(service.Pid=org.apache.dns.factory)
> Antlr exception trace:
> unexpected char: '.'
> 	at org.apache.ldap.common.filter.FilterParserImpl.parse(FilterParserImpl.java:128)
> 	at org.apache.ldap.server.jndi.ServerDirContext.search(ServerDirContext.java:594)
> 	... 17 more
>     // works fine
>     public void testLdapNameJdk() throws Exception
>     {
>         new javax.naming.ldap.LdapName( "asdf.asdf=asdf" );
>     }
>     // Parser failure on name:  asdf.asdf=asdf
>     public void testLdapNameApacheDs() throws Exception
>     {
>         new org.apache.ldap.common.name.LdapName( "asdf.asdf=asdf" );
>     }
> org.apache.ldap.common.exception.LdapInvalidNameException: Parser failure on name:
> 	asdf.asdf=asdf
> Antlr exception trace:
> line 1:5: unexpected char: '.'
> 	at org.apache.ldap.common.name.antlrTypeLexer.nextToken(antlrTypeLexer.java:154)
> 	at antlr.TokenStreamSelector.nextToken(TokenStreamSelector.java:64)
> 	at antlr.TokenBuffer.fill(TokenBuffer.java:69)
> 	at antlr.TokenBuffer.LA(TokenBuffer.java:80)
> 	at antlr.LLkParser.LA(LLkParser.java:52)
> 	at antlr.Parser.match(Parser.java:212)
> 	at org.apache.ldap.common.name.antlrNameParser.attributeTypeAndValue(antlrNameParser.java:185)
> 	at org.apache.ldap.common.name.antlrNameParser.nameComponent(antlrNameParser.java:120)
> 	at org.apache.ldap.common.name.antlrNameParser.name(antlrNameParser.java:69)
> 	at org.apache.ldap.common.name.DnParser.parse(DnParser.java:187)
> 	at org.apache.ldap.common.name.LdapName.<init>(LdapName.java:93)
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira