-
Notifications
You must be signed in to change notification settings - Fork 96
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
Input mapping is buggy #310
Comments
Thanks for the report, this makes sense to me. You're the first in quite a long time to report this, so at least it's not a giant impact. Do you see a way for us to fix this without breaking changes? |
So basically, no one is using this with data in which a property name contains dots or backslashes and the value is not already JSON-compatible, which seems likely.
I think that depends upon what you consider breaking. But in the strictest sense, breakage seems necessary because a But if you're trying to preserve backwards compatibility such that unaffected { json, meta } records produced by an old version can still be correctly decoded by a new version that fixes this issue, that would be possible—any Footnotes
|
Thanks for the recommendation. The second form of backwards compat is what i'm after, I don't want the gazillion of persisted SuperJSON strings to suddenly start failing. I'd also like to keep usage of this library simple and straight-forward, so having an opt-in for something of this bugs level of detail is a no-go. I think we can ensure backwards compatibility by introducing a version tag that toggles old vs new parsing behaviour. #311 implements that - could you give it a look? |
Fuzzing sounds like a great idea btw. |
This package commits the cardinal sin of escaping: failing to fully exempt non-escaped input from unescaping (e.g.,
escapeKey
escapes each.
as\.
but fails to escape\
itself). As a result, there are some injection bugs: https://jsfiddle.net/euqLwk4r/input
encodes to
which decodes as the input-dissimilar
The text was updated successfully, but these errors were encountered: