Re: [MapServer-users] MS_MAP_PATTERN cannot accept network share

2023-03-24 Thread Steve Lime
Hi Benedek: You'll need to fiddle with MS_MAP_BAD_PATTERN. Looking at the
sample configuration file it's value is:

  MS_MAP_BAD_PATTERN "[/\\]{2}|[/\\]?\\.+[/\\]|,"

If a mapfile path matches any of those, it's rejected. By default it's
blocking anything with \\, //, back references or commas anywhere in the
path. This makes it easier to write clear MS_MAP_PATTERN values. Anway, you
can override that value in the config file to remove blocking the //. Then
you'd want to make sure your MS_MAP_PATTERN starts with something like:

  MS_MAP_PATTERN "^//MY-NAS/MapFiles"

and be sure to test your patterns. Let us know how it goes.

--Steve

On Thu, Mar 23, 2023 at 3:48 PM Benedek Petrovicz <
benedek.petrov...@gmail.com> wrote:

> Hi!
>
> I'm running into an issue where I cannot reference the mapfiles from a
> network share.
> I'm getting the following error: *msCGILoadMap(): Web application error.
> CGI variable "map" fails to validate.*
>
> The path to my mapfile is the following: *//MY-NAS/MapFiles/test.map*
> It's under a network share.
>
> I know that it should work, because when I set a MAP alias to the same
> path in the global config, it just works.
>
> I tried multiple MS_MAP_PATTERN settings, but couldn't get it to accept
> the path.
>
>- *MS_MAP_PATTERN "."*
>- *MS_MAP_PATTERN "^.+$"*
>
> Is there any way to get MapServer accept a network share path?
> Unfortunately I cannot use the MAP aliases, because I have to make it work
> for multiple dynamic environments.
>
> I'm trying to make it work under MapServer 8.
>
> Thank you!
> Benedek
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] MS_MAP_PATTERN cannot accept network share

2023-03-23 Thread Benedek Petrovicz
Hi!

I'm running into an issue where I cannot reference the mapfiles from a
network share.
I'm getting the following error: *msCGILoadMap(): Web application error.
CGI variable "map" fails to validate.*

The path to my mapfile is the following: *//MY-NAS/MapFiles/test.map*
It's under a network share.

I know that it should work, because when I set a MAP alias to the same path
in the global config, it just works.

I tried multiple MS_MAP_PATTERN settings, but couldn't get it to accept the
path.

   - *MS_MAP_PATTERN "."*
   - *MS_MAP_PATTERN "^.+$"*

Is there any way to get MapServer accept a network share path?
Unfortunately I cannot use the MAP aliases, because I have to make it work
for multiple dynamic environments.

I'm trying to make it work under MapServer 8.

Thank you!
Benedek
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users