Peter Smythe ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b3b4ba74e83c12dd31159d6
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-10986?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 ) GEOS-10986 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10986?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 ) Double URL-decoding for tilecache CQL_FILTER parameter? ( 
https://osgeo-org.atlassian.net/browse/GEOS-10986?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.22.2 Assignee: Unassigned Attachments: 
image-20230522-111410 (2292931d-e0ef-4e22-8995-fbaf65b22d4a).png, 
image-20230522-111410.png Created: 22/May/23 1:21 PM Priority: Medium Reporter: 
Peter Smythe ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b3b4ba74e83c12dd31159d6
 )

Sample URL: 
https://localhost:8080/geoserver/wms?CQL_FILTER=time+DURING+2021-01-01T00:00:00%2B02:00/2023-05-21T23:59:00%2B02:00&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&tiled=true&STYLES&LAYERS=workspace:layer&WIDTH=256&HEIGHT=256&SRS=EPSG%3A4326&BBOX=22.5%2C-33.75%2C28.125%2C-28.125
 ( 
https://dev-intelligence-ogc.afrigis.co.za/mapservice/wms?CQL_FILTER=time+DURING+2021-01-01T00:00:00%2B02:00/2023-05-21T23:59:00%2B02:00&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&tiled=true&STYLES&LAYERS=discovery%3Asearch_mmd&exceptions=application%2Fvnd.ogc.se_inimage&tilesOrigin=-180%2C-90&WIDTH=256&HEIGHT=256&SRS=EPSG%3A4326&BBOX=22.5%2C-33.75%2C28.125%2C-28.125
 )

Specifically notice the CQL_FILTER acting on the time property, using ECQL 
DURING which takes a period.

The period is correctly URL encoded as 
2021-01-01T00:00:00%2B02:00/2023-05-21T23:59:00%2B02:00 , which URL-decoded is 
2021-01-01T00:00:00+02:00/2023-05-21T23:59:00+02:00. Note the timezone is 
specified using a plus sign: +02:00.

This CQL works correctly when requesting un-tiled layers. However, if tiling is 
enabled, and the correct filter is configured in the Tile Caching tab:

then the image returned is blank. In the logs, the following can be observed:

22 May 12:57:31 ERROR  [geoserver.ows] -
org.geoserver.platform.ServiceException: Could not parse CQL filter list.
        at 
org.geoserver.ows.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:29)
        at org.geoserver.ows.util.KvpUtils.parse(KvpUtils.java:438)
        at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1495)
        at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1491)
        at org.geoserver.ows.Dispatcher.init(Dispatcher.java:319)
        at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238)
        at 
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
        at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1368)
        at 
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:693)
<snip>
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.geotools.filter.text.cql2.CQLException: Encountered "DURING 
2021-01-01T00:00:00 02" at line 1, column 6.
Was expecting one of:
   "(" ...
<snip>
   "during" <DATE_TIME> "/" ...
   "during" <DURATION> ...
<snip>
    Parsing : time DURING 2021-01-01T00:00:00 02:00/2023-05-21T23:59:00 02:00.
        at 
org.geotools.filter.text.ecql.ECQLCompiler.compileFilterList(ECQLCompiler.java:116)
        at 
org.geotools.filter.text.commons.CompilerUtil.parseFilterList(CompilerUtil.java:214)
        at org.geotools.filter.text.ecql.ECQL.toFilterList(ECQL.java:176)
<snip>

Note the period that geotools is unsuccessfully trying to parse: time DURING 
2021-01-01T00:00:00 02:00/2023-05-21T23:59:00 02:00 `, specifically the 
timezone: `{{ 02:00}}`, where the plus sign has been double URL decoded to a 
space, which makes the period not a valid time period.

( 
https://osgeo-org.atlassian.net/browse/GEOS-10986#add-comment?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10986#add-comment?atlOrigin=eyJpIjoiODY4NWE4ZGVlMDE1NDdmOGE4MGJkMjJmODM2NzZkMTQiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- 
sha1:bbd69a1 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to