tj / node-querystring

querystring parser for node and the browser - supporting nesting (used by Express, Connect, etc)
MIT License
455 stars 66 forks source link

Fixed bug when nested POST variables contained excessive characters #50

Open shybovycha opened 11 years ago

shybovycha commented 11 years ago

We faced a pity situation when the form

<form ...>
<input name="question[options[a]]" />
</form>

being submit returned the object

{
  question: {
    options: {
      'a]': 'the value'
    }
  }
}

Found the bug when excessive elements were merged into the object, fixed simply removing them from the parts array being merged.

Note: this is a major-priority bugfix as it may break much functionality!

tj commented 11 years ago

tests please!

shybovycha commented 11 years ago

tested on our real project =) yet successful =)

tj commented 11 years ago

that doesn't count :p

shybovycha commented 11 years ago

Okay, what exactly do you mean saying tests please! ?

Damn! Just now read the word tests ... First N times were read as test... Sorry :stuck_out_tongue_closed_eyes: Anyway, what do you mean?