You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org> on 2018/06/20 12:35:00 UTC
[jira] [Assigned] (SYNCOPE-1321) Search doesn't work for date
attributes with conversion pattern with time zone
[ https://issues.apache.org/jira/browse/SYNCOPE-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò reassigned SYNCOPE-1321:
-----------------------------------------------
Assignee: Francesco Chicchiriccò
> Search doesn't work for date attributes with conversion pattern with time zone
> ------------------------------------------------------------------------------
>
> Key: SYNCOPE-1321
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1321
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.8
> Reporter: Alexey
> Assignee: Francesco Chicchiriccò
> Priority: Major
> Labels: date, format, formatDate, schema, time_zone
> Fix For: 2.0.9, 2.1.0
>
> Attachments: after.PNG, before.PNG
>
>
> 1.) I have _date type_ *PlainSchemaTO* configured with conversion pattern
> {{org.apache.cxf.jaxrs.ext.search.SearchUtils.TIMESTAMP_WITH_TIMEZONE_Z = }}{{"yyyy-MM-dd\'T\'HH:mm:ssZ"}}
> 2.) For instance, I built a new query using
> {{org.apache.cxf.jaxrs.ext.search.client.FiqlSearchConditionBuilder with an appropriate settings for date format.}}
> 3.) Query is built successfully, for instance
> "date_att=lt=2018-06-12T15:21:00+0300"
> but after its value being processed by *URLDecoder* in
> {{org.apache.syncope.core.persistence.api.search.SearchCondVisitor, see line 79:}}
> {{value = SearchUtils.toSqlWildcardString(*URLDecoder*.*decode*(sc.getStatement().getValue().toString(), StandardCharsets.UTF_8.name()), false).replaceAll("\\\\_", "_");}}
> plus sign ('*+*') is replacing with space (' ') which leads to incorrect query processing in further Syncope code.
> I assume *URLDecoder.decode* should be removed, it should be already done by a servlet container.
> Currently, I'm using a quite ugly fix by double encoding date schema value on a client side and dealing with date values as string ones...
> Kind Regards,
> Alexey
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)