You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org> on 2005/03/24 23:54:21 UTC

[jira] Created: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Search request BER parser incorrectly parses complex filters.
-------------------------------------------------------------

         Key: DIRLDAP-38
         URL: http://issues.apache.org/jira/browse/DIRLDAP-38
     Project: Directory LDAP
        Type: Bug
  Components: Common  
    Versions: 0.9.0    
 Environment: NA
    Reporter: Jacob S. Barrett
 Assigned to: Alex Karasulu 


Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:

(& (a=A) (| (b=B) (c=C) ) )

The resulting expression object after the BER parser is finished is:

(& (| (c=C) (b=B) (a=A) ) )

This is obviously not the correct expression and results in bobus results.

I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.

I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.



-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by Alex Karasulu <ao...@bellsouth.net>.
Alex Karasulu (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61564 ]
>     
>Alex Karasulu commented on DIRLDAP-38:
>--------------------------------------
>
>Nevermind my last comment - I stopped being lazy and just looked inside the patch.  I see what you did and applied the patch here in committed revision 159053:
>
>  
>
ooops two copies of the same url ...

http://svn.apache.org/viewcvs.cgi?rev=159053&view=rev

>http://svn.apache.org/viewcvs.cgi?rev=159053&view=revhttp://svn.apache.org/viewcvs.cgi?rev=159053&view=rev
>
>Thanks!
>
>  
>
>>Search request BER parser incorrectly parses complex filters.
>>-------------------------------------------------------------
>>
>>         Key: DIRLDAP-38
>>         URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>>     Project: Directory LDAP
>>        Type: Bug
>>  Components: Common
>>    Versions: 0.9.0
>> Environment: NA
>>    Reporter: Jacob S. Barrett
>>    Assignee: Alex Karasulu
>>    Priority: Blocker
>>     Fix For: 0.9.0
>> Attachments: AND-OR-2.patch, AND-OR.patch
>>
>>Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
>>(& (a=A) (| (b=B) (c=C) ) )
>>The resulting expression object after the BER parser is finished is:
>>(& (| (c=C) (b=B) (a=A) ) )
>>This is obviously not the correct expression and results in bobus results.
>>I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
>>I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.
>>    
>>
>
>  
>


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61564 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

Nevermind my last comment - I stopped being lazy and just looked inside the patch.  I see what you did and applied the patch here in committed revision 159053:

http://svn.apache.org/viewcvs.cgi?rev=159053&view=revhttp://svn.apache.org/viewcvs.cgi?rev=159053&view=rev

Thanks!

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR-2.patch, AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61562 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

No problem at all.  Can you supply a patch based on the changes I've made.  I'll look at it and apply it immediately.  This is why I have to use the BranchNormalizingVisitor to rearrange nodes for comparisons.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR-2.patch, AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=history ]
     
Alex Karasulu resolved DIRLDAP-38:
----------------------------------

    Resolution: Fixed

Jacob good fast fix but I took another approach.  Regardless the patch was much appreciated.  Keep flushing out those bugs you're really knocking them out.  Enjoy poker :).

Committed in revision 158987:

http://svn.apache.org/viewcvs.cgi?rev=158987&view=rev



> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=history ]

Alex Karasulu updated DIRLDAP-38:
---------------------------------

       Priority: Blocker  (was: Major)
    Fix Version: 0.9.0

Have not had the time yet to look at this one but if you're right this is really serious.  We cannot release 0.9 without it.  Can you attach a patch with a test case showing this bug in effect?  If you are printing it out into a string it might be the visitor that prints out the info or the normalizing visitor that is causing this.  The normalizing visitor tries to rearrange the AST for the filter so terms in the same nesting level are in the same cannonical order when printed out - this is done to be able to compare filter expressions.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61534 ]
     
Jacob S. Barrett commented on DIRLDAP-38:
-----------------------------------------

I will keep digging at it too.  So far what I have found is that when commons.berlib.asn1.decoder.search.OrRule.finish() is called it pops all the expressions off the stack.  On the stack are all three equality expressions are on the stack.  It appears as though there is no scoping.  The (a=A) expression should not be within the scope of the OrRule.

Hope this helps you narrow it down faster.  I am still trying to come up to speed on all this code.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61563 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

Is this second patch applied after I made the changes?  Meaning did you update then fix the rearrangement problem then generate the patch?

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR-2.patch, AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61536 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

Ahhh ok you're going through ASN.1 ok I see.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61556 ]
     
Jacob S. Barrett commented on DIRLDAP-38:
-----------------------------------------

I hate to be a pest but there is still a problem.  The ExprNodes are added in the reverse order.  If a rule was ordered specifically to match faster that optimization will be lost.  With your fix it would be more appropriate to call BranchNode.addNodeToHead(ExprNode).

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=history ]

Jacob S. Barrett updated DIRLDAP-38:
------------------------------------

    Attachment: AND-OR-2.patch

This patch removes so debug code left in and corrects the oder of the ExprNodes.  I thought about fixing the obvious performance hit of shifting the ArrayList elements every time an expression is added, but you said that all this BER parser code is going to get reworked.  I will keep it in the back of my mind though.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR-2.patch, AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=history ]

Jacob S. Barrett updated DIRLDAP-38:
------------------------------------

    Attachment: AND-OR.patch

I think this fixes it.  It isn't the most pretty.  Should probably replace the Stack with LinkedList to get rid of the synchronizations, but I want to go play poker now.  I will post a better fix tomorrow some time.  Thanks for your help.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0
>  Attachments: AND-OR.patch
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Jacob S. Barrett (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61539 ]
     
Jacob S. Barrett commented on DIRLDAP-38:
-----------------------------------------

The AndRule.finish() is being called after the OrRule.finish() in my example.  For some reason the decoder is not sensing the end of the AndRule until after it has processed the OrRule.  I need to brush up on ASN.1 a bit more I guess.  It seems like something is wrong with detecting the end of a SET.

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61533 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

Actually scratch my last comment - I'm on it.  Could not help myself :).

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61535 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

I tried to reproduce the bug but could not.  I added the test case to on committed revision 158968.  Here's the commit diff in the repo:

http://svn.apache.org/viewcvs.cgi?rev=158968&view=rev


> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIRLDAP-38) Search request BER parser incorrectly parses complex filters.

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-38?page=comments#action_61540 ]
     
Alex Karasulu commented on DIRLDAP-38:
--------------------------------------

Just got back from dinner.  I think I figured this out.  Basically the AND/OR nodes keep eating from the top of the stack until there is no longer an ExprNode left.  This is because there can be 2 or more subexpressions in these kinds of nodes.  So what is happening is the OR rule is eating the expression a=A.  

I just need a separator object between them so I know when to stop eating from the digester stack.  

BTW this is very very nasty code.  We are planing for a revamp soon so don't beat yourself for not understanding it.  I wrote this in a hurry to get rid of a snacc4j dependency which blocked our incubator exit.


> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>          Key: DIRLDAP-38
>          URL: http://issues.apache.org/jira/browse/DIRLDAP-38
>      Project: Directory LDAP
>         Type: Bug
>   Components: Common
>     Versions: 0.9.0
>  Environment: NA
>     Reporter: Jacob S. Barrett
>     Assignee: Alex Karasulu
>     Priority: Blocker
>      Fix For: 0.9.0

>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DIRSERVER-193) Search request BER parser incorrectly parses complex filters.

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

Emmanuel Lecharny closed DIRSERVER-193.
---------------------------------------


Closing all issues created in 2005 and before which are marked resolved

> Search request BER parser incorrectly parses complex filters.
> -------------------------------------------------------------
>
>                 Key: DIRSERVER-193
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-193
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: pre-1.0
>         Environment: NA
>            Reporter: Jacob S. Barrett
>         Assigned To: Alex Karasulu
>            Priority: Blocker
>             Fix For: pre-1.0
>
>         Attachments: AND-OR-2.patch, AND-OR.patch
>
>
> Using the following search from an LDAP client, like Softera's browser or OpenLDAP's ldapsearch, search for something like the following filter:
> (& (a=A) (| (b=B) (c=C) ) )
> The resulting expression object after the BER parser is finished is:
> (& (| (c=C) (b=B) (a=A) ) )
> This is obviously not the correct expression and results in bobus results.
> I thought at first it might have been the expression object serializing to a string form that had issue, but passing the same filter string through the commons.filter.FilterParserImpl produces the correct expression object and the correct serialized string.
> I am attempting to debug the problem further.  If I can produce a patch I will post it, but if someone has a better idea of what is going please tackle this.

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