[mapserver-users] qstring validation question
John B. Churchill
jchurchill at al.umces.edu
Tue Sep 16 13:56:01 PDT 2008
Steve Lime wrote:
> JohN: It's given as a regex in the layer metadata:
>
> 'qstring_validation_pattern' '^[0-9]{1,2}$'
>
> This one limits the qstring to a 1 or 2 digit integer.
>
> Steve
Thanks Steve ... I actually got this working by looking through old
archived [mapserver-users] e-mails. I found one where someone showed an
example of this with layer metadata in the MAP file like this ...
METADATA
qstring_validation_pattern '.'
END
Which got everything working for me. If I don't hear anything else
about this, I'll assume what I did is Ok. If that is poor form or will
cause problems down the line I'll do it as you've specified above with a
more complicated regex (if theres any reason to do so). I assume this
was done for security ? The pattern matched (in my application) can be
pretty variable.
Thanks,
J.B.
>>>> On 9/16/2008 at 10:05 AM, in message <48CFCB43.10203 at al.umces.edu>, "John B.
> Churchill" <jchurchill at al.umces.edu> wrote:
>> We recently upgraded to a newer version of Mapserver. I'm guessing the
>> problem with my old scripts are due to the upgrade (seems likely).
>>
>> I'm getting this error:
>> mapserv(): Web application error. Metadata qstring_validation_pattern is
>> not set.
>>
>> My qstring is set by my javascript. What should the
>> qstring_validation_pattern look like ? Can someone direct me to an
>> example that shows this ? I tried to browse the online documentation
>> but it appears to be down.
>>
>> J.B.
>
>
More information about the MapServer-users
mailing list