You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Tomasz Juchniewicz (JIRA)" <ji...@apache.org> on 2009/07/22 12:37:14 UTC

[jira] Created: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Filter expression  'abc\' sended from Outlook parsed as null.
-------------------------------------------------------------

                 Key: DIRSERVER-1385
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
             Project: Directory ApacheDS
          Issue Type: Bug
    Affects Versions: 1.5.4
            Reporter: Tomasz Juchniewicz
            Priority: Minor


I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).

I send query from Outlook.
I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Tomasz Juchniewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734094#action_12734094 ] 

Tomasz Juchniewicz commented on DIRSERVER-1385:
-----------------------------------------------

I use Studio 1.4.0.v20090407.

> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734102#action_12734102 ] 

Stefan Seelmann commented on DIRSERVER-1385:
--------------------------------------------

Just check with the current ApacheDS trunk, here filter 4 works. Filter 2 works too, even that is not allowed regarding to RFC4515.

There were some issue regarding backslash in filters, that are fixed in trunk:
  https://issues.apache.org/jira/browse/DIRSERVER-1311
  https://issues.apache.org/jira/browse/DIRSERVER-1181
  https://issues.apache.org/jira/browse/DIRSERVER-1247

So I think it is fixed in 1.5.5. Are you able to try 1.5.5-SNAPSHOT?


> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Tomasz Juchniewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734081#action_12734081 ] 

Tomasz Juchniewicz commented on DIRSERVER-1385:
-----------------------------------------------

I use Outlook "contain" filter:
when I type in filter textfield ("abc"), Outlook sends ("abc"), in ApacheDS I have (2.5.4.3=*"abc"*) 
when I type in filter textfield (abc\), Outlook sends (abc\), in ApacheDS I have (2.5.4.3=*null*)

I think it is a Outlook bug. I sniffed what Outlook sends in request and it sends unescaped special characters.


> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734074#action_12734074 ] 

Emmanuel Lecharny commented on DIRSERVER-1385:
----------------------------------------------

Either you want to escape the ", or to include a \ in your filter, but in any case, the filter is not good.

It should be (cn="abc\\") or (cn="abc\"")

Can you test both ?

> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734107#action_12734107 ] 

Emmanuel Lecharny commented on DIRSERVER-1385:
----------------------------------------------

I confirm this has been fixed in the coming 1.5.5 ApacheDS version. I have done a test with Studio 1.4 and ADS 1.5.5-SNAPSHOT, with a request like :
    SearchRequest
        baseDn : 'ou=system'
        filter : '(ObjectClass="test\5c")'
        scope : single level
        typesOnly : false
        Size Limit : 1000
        Time Limit : no limit
        Deref Aliases : deref Always
        attributes : 'objectclass'


This is the dump of what the server receives. 



> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734093#action_12734093 ] 

Emmanuel Lecharny commented on DIRSERVER-1385:
----------------------------------------------

Out of those four tests, the three first are just fine (ie, even 2 is an invalid filter)

The forth one is a problem, but probably on Studio. Which version are you using ?

> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Tomasz Juchniewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734118#action_12734118 ] 

Tomasz Juchniewicz commented on DIRSERVER-1385:
-----------------------------------------------

So this is responsibility of server to escape special characters found request?
Filter expressions are transported unescaped? If so Outlook works fine.

> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Resolved: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-1385.
------------------------------------------

    Resolution: Fixed

Definitively a bug in Outlook. RFC 4515 states that the filter grammar does not allow a \ in a filter :

filter         ::= '(' filtercomp ')'
filtercomp     ::= and / or / not / item
item           ::= simple / present / substring / extensible
simple         ::= attr filtertype assertionvalue
assertionvalue ::= valueencoding
valueencoding  ::= 0*(normal / escaped)
normal         ::= UTF1SUBSET / UTFMB
escaped        ::= ESC HEX HEX
UTF1SUBSET     ::= %x01-27 / %x2B-5B / %x5D-7F
                          ; UTF1SUBSET excludes 0x00 (NUL), '(',
                          ; ')', '*', and '\'

In fact, I was slightly wrong in my previous comment. The filter should have been :
(cn="abc\5C")

as described in the RFC samples :
        (filename=C:\5cMyFile)

Not sure why there are " around the values, btw... Probably that Outlook expect the server will consider the inner '\' as a normal character ?

M$ should consider reading carefully the RFCs before implementing some of them ...





> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734120#action_12734120 ] 

Emmanuel Lecharny commented on DIRSERVER-1385:
----------------------------------------------

No : if you send some trash to the server, it will just discard the request.

It's the client's responsability to send correctly designed filters.

> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Closed: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-1385.
----------------------------------------


> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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


[jira] Commented: (DIRSERVER-1385) Filter expression 'abc\' sended from Outlook parsed as null.

Posted by "Tomasz Juchniewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734089#action_12734089 ] 

Tomasz Juchniewicz commented on DIRSERVER-1385:
-----------------------------------------------

Apache Directory Studio search results:

when I type in filter textfield (cn=abc) in ApacheDS I have (2.5.4.3=abc)   - OK
when I type in filter textfield (cn=abc\\) in ApacheDS I have (2.5.4.3=null)  - ??
when I type in filter textfield (cn=abc\) can't search, wrong parameters - OK
when I type in filter textfield (cn=abc\5c)  in ApacheDS I have (2.5.4.3=null) - ??

I'm implementing my own Partition and I use SearchOperationContext.getFilter() to see what filter was send from client.



> Filter expression  'abc\' sended from Outlook parsed as null.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-1385
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1385
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Tomasz Juchniewicz
>            Priority: Minor
>
> I send filter like this: commonName= "abc\" and it is parsed as:  (2.5.4.3=*null*).
> I send query from Outlook.
> I don't know, it is a Outlook or ApacheDS bug.

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