-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS_MAP_PATTERN regex wont match files with hyphens #171
Comments
Thanks David, I will fix that :-) |
Maybe this should simplify things even more... -- quote from Steve Lime from discussion mentioned above --
|
Thanks, I will have a look :-) |
Reopen to investigate about MS_MAP_BAD_PATTERN |
When I try to pass mapfile with hyphens I got this validation 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 HTTP/1.1" 200 620 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3)"
It is caused by escaped hyphens in
MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
It should probably look like this
MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$
Discussion about this error on MS mailing list:
http://osgeo-org.1560.x6.nabble.com/CGI-variable-quot-map-quot-fails-to-validate-td5487971.html
The text was updated successfully, but these errors were encountered: