Re: Somewhat incorrect multi-value query parameter processing

Brandon Long <[email protected]> Tue, 15 Sep 2009 21:17:14 -0700
Newsgroups gmane.text.clearsilver.general
Organization Fiction L Networks
Message-ID <20090916041714.GB24077@bl1>
Ah, in this case, since there was no other node, I can see this.  I
don't know what do do if you have:

node.child1 = a
node.child2 = b
node.child3 = c
node = d
node = e

Even with your patch, you'd get something like:
node = e
node {
  child1 = a
  child2 = b
  child3 = c
  3 = d
  4 = e
}

(well, I didn't try it)... but, if you override like that, I guess
that's what you get.

I think your patch is fine, though compatibility... ugh.

Brandon

On 09/15/09 Nikolai Kondrashov uttered the following other thing:
> Hello everybody, Brandon
> 
> Once again, I have noticed a somewhat incorrect processing of multi-value
> query parameters. Only this time I decided to fix and report it.
> 
> The problem appears when you have both node value and children in the POST,
> like this:
> 
> node.child1 = a
> node.child2 = b
> node.child3 = c
> node = d
> 
> This results in the Query dataset being like this:
> 
> node = d
> node {
>     child1 = a
>     child2 = b
>     child3 = c
>     3 = d
> }
> 
> This is because the _parse_query function mistakes "node" to be a
> multi-value parameter, since it checks only for node presence, but not for
> the value presence.
> 
> I think this is somewhat confusing, while easily fixable. Please find the
> patch attached.
> 
> Sincerely,
> Nick
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 
-- 
  "The Creation of the Universe was made possible by a grant from Texas
     Instruments." -- Credits, The Creation of the Universe (PBS)
                                          http://www.fiction.net/blong/