directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1367) Protocol error when requesting attribute with the space character only
Date Sun, 17 May 2009 22:33:45 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710232#action_12710232
] 

Emmanuel Lecharny commented on DIRSERVER-1367:
----------------------------------------------

When running the test, here is the PDU the server receives ;

0x30 0x4B 
  0x02 0x01 0x02 
    0x63 0x29 
      0x04 0x09 
        0x6F 0x75 0x3D 0x73 0x79 0x73 0x74 0x65 0x6D 
      0x0A 0x01 0x00 
      0x0A 0x01 0x03 
      0x02 0x01 0x00 
      0x02 0x01 0x00 
      0x01 0x01 0x00 
      0x87 0x0B 
        0x6F 0x62 0x6A 0x65 0x63 0x74 0x43 0x6C 
        0x61 0x73 0x73 
    0x30 0x00   <---- This is an empty list of attributes to return
    0xA0 0x1B 
      0x30 0x19 
        0x04 0x17 
          0x32 0x2E 0x31 0x36 0x2E 0x38 0x34 0x30 
          0x2E 0x31 0x2E 0x31 0x31 0x33 0x37 0x33 
          0x30 0x2E 0x33 0x2E 0x34 0x2E 0x32 

So we correctly assume that we have to return all the user's attributes, as if the client
sent the request with no attributes at all.

Now, the problem is that JNDI does not parse correctly the response. This has to be checked.

> Protocol error when requesting attribute with the space character only
> ----------------------------------------------------------------------
>
>                 Key: DIRSERVER-1367
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1367
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.4
>            Reporter: Stefan Seelmann
>            Assignee: Emmanuel Lecharny
>             Fix For: 1.5.5
>
>
> When setting the returning attributes of a search to the space character the server returns
a protocol error:
> ldapsearch -H ldap://localhost:10389 -x -D "uid=admin,ou=system" -W -b "ou=users,ou=system"
-s base -a always "(objectClass=*)" " "
> The result is the following error:
> # extended result response
> extended: 1.3.6.1.4.1.1466.20036
> data:
> result: 2 Protocol error
> text: PROTOCOL_ERROR: The server will disconnect!
> Here is a testcase using JNDI:
> Index: src/test/java/org/apache/directory/server/operations/search/SearchIT.java
> ===================================================================
> --- src/test/java/org/apache/directory/server/operations/search/SearchIT.java	(revision
774248)
> +++ src/test/java/org/apache/directory/server/operations/search/SearchIT.java	(working
copy)
> @@ -1321,6 +1321,24 @@
>      
>      
>      /**
> +     * Check if no error occurs if " " is requested.
> +     */
> +    @Test
> +    public void testSearchUserAttributes_Space() throws Exception
> +    {
> +        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE
);
> +        SearchControls ctls = new SearchControls();
> +
> +        ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
> +        ctls.setReturningAttributes( new String[]
> +            { " " } );
> +
> +        NamingEnumeration<SearchResult> result = ctx.search( HEATHER_RDN, FILTER,
ctls );
> +        result.close();
> +    }
> +
> +
> +    /**
>       * Check if user and operational attributes are present, if both "*" and "+" are
requested.
>       */
>      @Test

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message