-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Upgrading json-smart to version 2.4.9 leads to Exception in karate summary #2277
Comments
@AndreasBAtT tagging this as |
Hi @ptrthomas ,
Normally this dependency comes in the version 2.4.7 transitively via If you like I can fork the repo with the changes I made locally? Or is this enough to reproduce this? KR, Markus |
@markusadelsberger thanks ! for now, I think what you have is enough to replicate. hopefully using a custom parser at that point will fix it - let me take a look |
@markusadelsberger @AndreasBAtT I've attempted a fix, do see if you can build locally and validate: https://github.com/karatelabs/karate/wiki/Developer-Guide |
@ptrthomas Hi, i can confirm that the fix works. Thank you. |
@AndreasBAtT thanks, I'll keep this open and close when 1.4.0 final is released |
@ptrthomas With version 2.4.10. of json-smart the json parser is working again |
@AndreasBAtT that's good to know, maybe we can revert the change. I'll check |
I confirm. Got same issue forcing the upgrade to 2.4.9 because of CVE-2023-1370. But 2.4.10 fixed it. |
1.4.0 released |
Hi @ptrthomas ,, for the version 2.4.10 also, the same error is throwing com.jayway.jsonpath.InvalidJsonException: net.minidev.json.parser.ParseException: Malicious payload, having non natural depths, parsing stoped on { at position 62015. |
if you see this problem in Karate 1.4.1 then please follow this process asap: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue @prajwalbandak |
If you upgrade net.minidev.json-smart to version 2.4.9 the Karate reports will fail in some cases with an exception.
In Version 2.4.9. of json-smart max depth is hard limited to 400. Maybe this is the reason for it.
com.jayway.jsonpath.InvalidJsonException: net.minidev.json.parser.ParseException: Malicious payload, having non natural depths, parsing stoped on { at position 62015.
Caused by: net.minidev.json.parser.ParseException: Malicious payload, having non natural depths, parsing stoped on { at position 62015.
at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:557)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:465)
at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:612)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:465)
at net.minidev.json.parser.JSONParserBase.readArray(JSONParserBase.java:335)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:468)
at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:612)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:465)
at net.minidev.json.parser.JSONParserBase.readArray(JSONParserBase.java:335)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:468)
at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:612)
at net.minidev.json.parser.JSONParserBase.readFirst(JSONParserBase.java:363)
at net.minidev.json.parser.JSONParserBase.parse(JSONParserBase.java:216)
at net.minidev.json.parser.JSONParserString.parse(JSONParserString.java:58)
at net.minidev.json.parser.JSONParser.parse(JSONParser.java:278)
at com.jayway.jsonpath.spi.json.JsonSmartJsonProvider.parse(JsonSmartJsonProvider.java:62)
... 87 more
The text was updated successfully, but these errors were encountered: