ljharb/qs

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

Open

#340 opened on Oct 22, 2019

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (744 forks)batch import
help wanted

Repository metrics

Stars
 (8,015 stars)
PR merge metrics
 (Avg merge 6d 22h) (2 merged PRs in 30d)

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