ljharb/qs

Bug: parse->stringify->parse get different results

Open

#340 opened on Oct 22, 2019

 (6 comments) (0 reactions) (0 assignees)JavaScript (911 forks)batch import
help wanted

Repository metrics

Stars
 (8,943 stars)
PR merge metrics
 (PR metrics pending)

Description

Hey There,

Found the following bug:

const qs = require('qs');
const assert = require('assert');

const str = '&=]p&Qm[UU3]={Qmm&Qm=]]&Qm[[UF3]mi]=mQvmQm;';
const obj = qs.parse(str);
const str1 = qs.stringify(obj);
const obj1 = qs.parse(str1);
assert.deepEqual(obj, obj1);

found by jsfuzz

Contributor guide