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

urlencoded strings not handled properly #43

Closed qzaidi closed 11 years ago

qzaidi commented 11 years ago

I am submitting a form where the '=' character is present, although its urlencoded.

querystring fails to handle this, but node's builitin querystring module handles it just fine.

qs.parse('tBK0FKOvgZw%3D=Uu%2BujGnmB1Y%3D')

should return

{ 'tBK0FKOvgZw=': 'Uu+ujGnmB1Y=' } (and this is what the builtin module returns)

but it gives this instead

{ 'tBK0FKOvgZw': '=Uu+ujGnmB1Y=' }

tj commented 11 years ago

we must be doing an indexOf after decoding, I'll look

qzaidi commented 11 years ago

Yes, it url decodes first and then takes the first equality sign it finds.

On 9/19/12, TJ Holowaychuk notifications@github.com wrote:

we must be doing an indexOf after decoding, I'll look


Reply to this email directly or view it on GitHub: https://github.com/visionmedia/node-querystring/issues/43#issuecomment-8665179