You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Dmitriy B. (Jira)" <ji...@apache.org> on 2019/09/09 14:28:00 UTC
[jira] [Created] (SYNCOPE-1490) Incorrect decoding when
constructing fiql query
Dmitriy B. created SYNCOPE-1490:
-----------------------------------
Summary: Incorrect decoding when constructing fiql query
Key: SYNCOPE-1490
URL: https://issues.apache.org/jira/browse/SYNCOPE-1490
Project: Syncope
Issue Type: Bug
Components: core
Affects Versions: 2.0.12
Reporter: Dmitriy B.
The incoming org.apache.cxf.jaxrs.ext.search.PrimitiveStatement#value value is already decoded in org.apache.syncope.core.persistence.api.search.SearchCondVisitor#visitPrimitive.
Thus, the useless logic that does decoding should be removed.
Otherwise, it leads to incorrect behavior: e.g. when special chars present it the property values.
For example, I have user with "phone" attribute and value of this attribute is "+1234556789112"
After double decoding, I'll have the " 1234556789112" instead of the original value.
Example of search request:
{code:language=java}
String fiqlQuery = SyncopeClient.getUserSearchConditionBuilder()
.is("phone").equalTo("+1234556789112")
.query();
AnyQuery anyQuery = new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).fiql(fiqlQuery).build();
PagedResult<UserTO> matchingUsers = userService.search(anyQuery);
{code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)