[Geoserver-devel] [JIRA] (GEOS-10231) Geoserver accepts (for gml) illegal Attribute names, making WFS return invalid GML

Richard Duivenvoorde created an issue

GeoServer / BugGEOS-10231

Geoserver accepts (for gml) illegal Attribute names, making WFS return invalid GML

Issue Type:

BugBug

Affects Versions:

2.19.2

Assignee:

Unassigned

Components:

WFS

Created:

14/Sep/21 9:17 AM

Environment:

Probably all, but tested on Debian Bookworm, standalone Geoserver 2.19.2

Originally the issue was in a Postgis db, but there is a Sqlite db available too to reproduce

Priority:

MediumMedium

Reporter:

Richard Duivenvoorde

See QGIS issue: https://github.com/qgis/QGIS/issues/45017#issuecomment-918040884

Geoserver accepts tables containing columns/attributes which start with a number as valid datastores.

But using that columns as attribute names in GML, for example returned by a WFS service on that data, results in ‘invalid’ GML (but depending on how the GML exactly is parsed, raising strange client results, see QGIS issue above).

I could think of a couple possible solutions:

  • do not accept tables with attributes/fields starting with a number
  • or give admins a big warning that they are exposing data with names which potentially will behave bad in a WFS
  • or return an error as result (like Gs does when there is no proper PK), mentioning the fact that certain attributes would give erroneous gml
  • or ‘fix’ the attribute names by prepending the attributes with ‘gs_’ or ‘fixed_’ or ‘x_’ or ‘whatever_’

Does that sound reasonable?

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#100177-sha1:d74d4e2)

Atlassian logo