Does CF really auto-decode URL parameters passed to a page?
cf docs , livedocs state that:
(for example, see urlencodedformat tag description, last sentence of opening paragraph)
however, if have url-encoded url parameters, in ?var1=1%26var2=2 (%26 url-encoded equivalent of &), , in page try validate url parameters <cfparam type="integer" name="url.var1"> or isvalid("integer", url.var1) function, validation fail! apparently, inside @ least tag , function cf not automatically decode url parameters... sees var1 declaration, sees value not 1, 1&var2=2, surely fails validation against type "integer"....
this behaviour has been brought in these forums several times now, nobody has been able explain how relates cf docs statement... ideas, anyone? expected behaviour? docs wrong? 'parameter', in "url parameters", refer specific parts of query string , not include url var name/value pairs separator? apparently same happens if have "=" sign url-encoded, too...
quote:
coldfusion automatically decodes url parameters passed page
(for example, see urlencodedformat tag description, last sentence of opening paragraph)
however, if have url-encoded url parameters, in ?var1=1%26var2=2 (%26 url-encoded equivalent of &), , in page try validate url parameters <cfparam type="integer" name="url.var1"> or isvalid("integer", url.var1) function, validation fail! apparently, inside @ least tag , function cf not automatically decode url parameters... sees var1 declaration, sees value not 1, 1&var2=2, surely fails validation against type "integer"....
this behaviour has been brought in these forums several times now, nobody has been able explain how relates cf docs statement... ideas, anyone? expected behaviour? docs wrong? 'parameter', in "url parameters", refer specific parts of query string , not include url var name/value pairs separator? apparently same happens if have "=" sign url-encoded, too...
i have think on this, reading , try experiments.
first thought expected behavior.
propose purpose of url encoding ampersand(&)
be considered part of value, not usual role of name-value pair
separator. in mind way supposed work.
val1=1&val2=2 : val1 1 , val2 2
val1=1%26var2=2 : val1 '1&var2' or '1&var2=2'
i have explore further.
first thought expected behavior.
propose purpose of url encoding ampersand(&)
be considered part of value, not usual role of name-value pair
separator. in mind way supposed work.
val1=1&val2=2 : val1 1 , val2 2
val1=1%26var2=2 : val1 '1&var2' or '1&var2=2'
i have explore further.
More discussions in ColdFusion
adobe
Comments
Post a Comment