ljharb/qs

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

Open

#340 aperta il 22 ott 2019

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)JavaScript (744 fork)batch import
help wanted

Metriche repository

Star
 (8015 star)
Metriche merge PR
 (Merge medio 6g 22h) (2 PR mergiate in 30 g)

Descrizione

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

Guida contributor