-
-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: parse->stringify->parse get different results #340
Comments
That looks like an invalid query string in the first place. (I don't think fuzz testing is a reliable approach for something like this) specifically, the |
Hey!:) but this is why I first parse it to a valid object and then stringify again and parse again. for example you can take the following example which will produce inequality as well. const qs = require('qs');
const assert = require('assert');
const obj = {
'Qm[': {
UF3: 'mQvmQm;'
},
Qm: {
']]': true,
UU3: '{Qmm'
}
}
const str = qs.stringify(obj);
const obj1 = qs.parse(str);
assert.deepEqual(obj, obj1); |
In that case, I do see that What do common frameworks (Rails, express, PHP) do with this query string? |
I'm not sure. but what is causing the |
Yes, that's also fair. I'd be open to a PR to handle that somehow. However, knowing what those other frameworks do would guide what the proper thing to do here is. |
Cool. I'm not sure I'll have time in the near future but maybe you can tag it as help-needed/feature and someone will weigh-in before me. |
Hey There,
Found the following bug:
found by jsfuzz
The text was updated successfully, but these errors were encountered: