[Geoserver-devel] [JIRA] (GEOS-10084) Cannot save the custom SQL session start script when using braces "{}" together with the ${GSUSER, geoserver}

Ondrej Svačina created an issue

GeoServer / BugGEOS-10084

Cannot save the custom SQL session start script when using braces “{}” together with the ${GSUSER,geoserver}

Issue Type:

BugBug

Affects Versions:

2.19.0

Assignee:

Unassigned

Created:

30/May/21 6:49 PM

Priority:

MediumMedium

Reporter:

Ondrej Svačina

There is a bug probably in the parser of the custom SQL session start/stop script of the data source.

If you use braces in the script, for example:
{{ select set_config(‘my.userString’, substring('$

{GSUSER,geoserver}', ‘user#“[0-9]{5}#”%’, ‘#’), false) }}
the saving fails with the
Already found a ${ sequence before the one at 83

If you do not use the braces in the Postgres regex, e.g.:
{{ select set_config(‘my.userString’, substring('${GSUSER,geoserver}

', ‘user#“[0-9]#”%’, ‘#’), false) }}

the save operation is successful.

This is an evident bug because the braces in the regex have nothing to do with the GeoSever variable.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100165-sha1:3611a76)

Atlassian logo