<div dir="ltr">Hi David: Presumably the Docker image is running the most recent version of 7.4 which would have that pull request applied. That said, I don't think it's the culprit here and I have seen some issues with -'s where the MS_MAP_PATTERN expression compiles fine but doesn't match as expected. Re-writing the expression to move the - character can help. Try this:<div><br></div><div>  MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$</div><div><br></div><div>--Steve</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello, <br></div><div>I'm using camptocamp/mapserver:7.4 docker image to run mapserver on our servers and I have recently encountered this error:</div><div><br></div><div>[warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error. CGI variable "map" fails to validate.<br>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"</div><div><br></div><div>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:</div><div><br></div><div>MS_ERRORFILE=stderr<br>MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$<br>MS_DEBUGLEVEL=0<br>MS_MAPFILE=/etc/mapserver/mapserver.map</div><div><br></div><div>Maybe something related to this PR: <a href="https://github.com/MapServer/MapServer/pull/6314" target="_blank">https://github.com/MapServer/MapServer/pull/6314</a></div><div><br></div><div>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) <br></div><div><br></div><div>Thanks, David<br> </div></div>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div>