[Devel] check_route_param doesn't find all params

Juha Heinanen jh at tutpro.com
Sun Dec 18 10:06:52 CET 2005


Juha Heinanen writes:

 > that is the first route param 'pm was NOT found.  i'll start to read the
 > code.  perhaps the first ; is skipped.

yes, it looks like parse_uri skips the first ";" and puts the rest in
params field.  so in my example case params becomes "pm;n1;lr".

i don't feel comfortable with regexp matching of check_route_param,
because if i omit ";" from ";pm", there is no guarantee that string "pm"
doesn't appear as part of some other route param or its value (for
example tag value that i don't have any control of).  it would be safer
if regexp would match only a single param, not all params as a single
string.

it would be ok for me to omit regexp matching all together and just
match for an exact param name possibly optionally followed by an exact
param value.

i can live with the current behavior too, but need to be very careful
with my checks.

-- juha



More information about the Devel mailing list