[mapserver-users] CGI variable "map" fails to validate.

David Pavlíček pavlicek.david at gmail.com
Wed Jun 2 01:07:36 PDT 2021


Hello,
I'm using camptocamp/mapserver:7.4 docker image to run mapserver on our
servers and I have recently encountered this error:

[warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error.
CGI variable "map" fails to validate.
2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +0000] "GET
/?map=/etc/mapserver/puobod/krpk-puobod-red.map&request=getcapabilities&service=WMS"

In fact, any mapfile with hyphens won't work. They fail against
MS_MAP_PATTERN regex or something. This is strange because I tested this
regex and it works fine. Container MS ENV variables look like this:

MS_ERRORFILE=stderr
MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
MS_DEBUGLEVEL=0
MS_MAPFILE=/etc/mapserver/mapserver.map

Maybe something related to this PR:
https://github.com/MapServer/MapServer/pull/6314

Any suggestions about that? Renaming project is not an option because they
are referenced in many places outside of our direct reach (GIS clients,
servers, etc)

Thanks, David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210602/015a9108/attachment.html>


More information about the mapserver-users mailing list