Hi,
I have just tried the same sample as above and obtained the same results.

The FIQL query is parsed into a SearchCond instance [1] by SearchCondVisitor [2]: at a first glance, I don't see any reason why parentheses should be ignored, but maybe it's only because I am quite tired at the moment :-)

If you're opening an issue, please set "affects-version" to 2.0.0.M5 and "fix-for-version" to 2.0.0, thanks.

Regards.

[1] https://github.com/apache/syncope/blob/master/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/search/SearchCond.java [2] https://github.com/apache/syncope/blob/master/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/search/SearchCondVisitor.java

On 01/09/2016 18:18, Colm O hEigeartaigh wrote:
Hi Iurii,

Yep there is an issue here. Could you open a JIRA for it?

I can reproduce with two users with attributes (city/country/state):

alice: dublin/ireland/abc
bob: dublin/canada/xyz

Using a FIQL of "city==dublin;country==ireland" using AnyQuery.Builder() correctly yields one user ("alice"). However using "(city==dublin,state==abc);country==ireland" yields both users incorrectly. It appears that it might be ignoring the country part and just returning the result of the brackets.

Colm.

On Thu, Sep 1, 2016 at 4:21 PM, Iurii Smyrnov <[email protected] <mailto:[email protected]>> wrote:

    Hi Syncope Devs,
    Could you please check Does Syncope support braces " ( ) " in a
    FIQL request ?

    I faced with an issue: it seems Syncope ignores braces in the
    request, for example (get groups items):
    - request is : (name==testA,name==testB);name==testC
    - the same request (http encoded) is:
    http://192.168.99.100:9080/syncope/rest/groups?fiql=
    
<http://192.168.99.100:9080/syncope/rest/groups?fiql=name%3D%3DtestA%2Cname%3D%3DtestB3Bname%3D%3DtestC>%28name%3D%3DtestA%2Cname%3D%3DtestB%29%3Bname%3D%3DtestC
    
<http://192.168.99.100:9080/syncope/rest/groups?fiql=name%3D%3DtestA%2Cname%3D%3DtestB3Bname%3D%3DtestC>

    In this case response should return zero items , but it returns
    Group item with name=testA  - the same result if there would not
    been braces like below:
    - request is : name==testA,name==testB;name==testC or FIQL encode
    name%3D%3DtestA%2Cname%3D%3DtestB%3Bname%3D%3DtestC
    
<http://192.168.99.100:9080/syncope/rest/groups?fiql=name%3D%3DtestA%2Cname%3D%3DtestB3Bname%3D%3DtestC>


    It seems Syncope ignores braces "( )".
    
<http://192.168.99.100:9080/syncope/rest/groups?fiql=name%3D%3DtestA%2Cname%3D%3DtestB3Bname%3D%3DtestC>

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC,
CXF Committer, OpenJPA Committer, PonyMail PPMC
http://home.apache.org/~ilgrosso/

Reply via email to