Hi Francesco

You are very kind, very often I've no idea (at least at the start) what is going on with the code I did :-)

Thanks, Sergey
On 12/10/17 14:51, Francesco Chicchiriccò wrote:
On 12/10/2017 11:23, Sergey Beryozkin wrote:
Hi Francesco

Sorry I did not help, checked your emails this morning only...

No worries Sergey, you've been precious - and I'm sure you'll be in the future - so many times!

Cheers.

On 12/10/17 10:14, Francesco Chicchiriccò wrote:
It turned out that the problem below was originated by the following statement:

https://github.com/apache/syncope/blob/2_0_X/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/search/SearchCondVisitor.java#L74

in the custom SearchConditionVisitor, which does not expect a value to be URL-decoded.

Regards.

On 12/10/2017 10:09, Francesco Chicchiriccò wrote:
Further test: with

fiql=ctype%3D%3Dou%3Dsample%252Co%3Disp

(rather than fiql=ctype%3D%3Dou%3Dsample,o%3Disp  as below)

no exceptions are raised,  but the FIQL string received on server side is

ctype==ou=sample%2Co=isp

and then parsed by [1] as

ou=sample\%2Co=isp

Any idea of what I am doing wrong here? Thanks.

Regards.

On 11/10/2017 17:51, Francesco Chicchiriccò wrote:
How to correctly escape the following FIQL expression?

ctype==ou=sample,o=isp

?

I have set the jaxrs:properties

      <entry key="search.lax.property.match" value="true"/>
      <entry key="fiql.support.single.equals.operator" value="false"/>
      <entry key="search.decode.values" value="true"/>

but the request URL

 http://localhost:9080/syncope/rest/users?fiql=ctype%3D%3Dou%3Dsample,o%3Disp

fails with

17:47:19.129 ERROR org.apache.syncope.core.rest.cxf.service.AbstractServiceImpl - Invalid FIQL expression: ctype==ou=sample,o=isp org.apache.cxf.jaxrs.ext.search.SearchParseException: Not a comparison expression: o=isp         at org.apache.syncope.common.lib.search.SyncopeFiqlParser.parseComparison(SyncopeFiqlParser.java:90) ~[syncope-common-lib-2.0.7-SNAPSHOT.jar:2.0.7-SNAPSHOT]         at org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parseAndsOrsBrackets(FiqlParser.java:230) ~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]         at org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parse(FiqlParser.java:167) ~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]         at org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:101) ~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]         at org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:82) ~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]         at org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:76) ~[cxf-rt-rs-extension-search-3.1.13.jar:3.1.13]

As you can see from the stacktrace, I am using my own parser [1].

TIA
Regards.


[1] https://github.com/apache/syncope/blob/2_0_X/common/lib/src/main/java/org/apache/syncope/common/lib/search/SyncopeFiqlParser.java

Reply via email to