-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
CVE Fix: Update json-path version #15772
Conversation
Updating to latest master
3ad578d
to
7334c7f
Compare
//Support for append has been added in json-path-2.9.0 | ||
//Assert.assertEquals(Collections.emptyList(), row.getDimension("append")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if append is now supported, then let's update the test to check that it does what it needs to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
row.getDimension("append")
results in java.lang.UnsupportedOperationException: Unused
coming from
druid/processing/src/main/java/org/apache/druid/java/util/common/parsers/FlattenerJsonProvider.java
Line 118 in 0089f6b
throw new UnsupportedOperationException("Unused"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Therefore, while the upstream has added the capability of append
, we are not using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understood, but there are two issues here:
- as a principle we don't leave commented code unless there's a very good reason.
- This is potentially being breaking change. Any json-path expression using append today would have silently been ignored, but would now cause an error.
My suggestion would be to:
- update the test to check that we do get the exception
- make a note in the PR description that we should call this out in the release notes as a potential issue to watch out for when upgrading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
extensions-core/orc-extensions/src/test/java/org/apache/druid/data/input/orc/OrcReaderTest.java
Outdated
Show resolved
Hide resolved
extensions-core/orc-extensions/src/test/java/org/apache/druid/data/input/orc/OrcReaderTest.java
Outdated
Show resolved
Hide resolved
…data/input/orc/OrcReaderTest.java Co-authored-by: Xavier Léauté <[email protected]>
…data/input/orc/OrcReaderTest.java Co-authored-by: Xavier Léauté <[email protected]>
I tried rerunning the flaky test. Didn’t seem to help. Since the failure doesn’t appear to related I’m ok merging this. |
Apache Druid brings the dependency json-path which is affected by CVE-2023-51074. Its latest version 2.9.0 fixes the above CVE. Append function has been added to json-path and so the unit test to check for the append function not present has been updated. --------- Co-authored-by: Xavier Léauté <[email protected]>
Apache Druid brings the dependency json-path which is affected by CVE-2023-51074. Its latest version 2.9.0 fixes the above CVE. Append function has been added to json-path and so the unit test to check for the append function not present has been updated. --------- Co-authored-by: Xavier Léauté <[email protected]>
Apache Druid brings the dependency json-path which is affected by CVE-2023-51074. Its latest version 2.9.0 fixes the above CVE. Append function has been added to json-path and so the unit test to check for the append function not present has been updated. --------- Co-authored-by: Xavier Léauté <[email protected]>
Apache Druid brings the dependency json-path which is affected by CVE-2023-51074. Its latest version 2.9.0 fixes the above CVE. Append function has been added to json-path and so the unit test to check for the append function not present has been updated. --------- Co-authored-by: Xavier Léauté <[email protected]>
* Upgrade pac4j-oidc to 4.5.7 to address CVE-2021-44878 (apache#15522) * Upgrade org.pac4j:pac4j-oidc to 4.5.5 to address CVE-2021-44878 * add CVE suppression and notes, since vulnerability scan still shows this CVE * Add tests to improve coverage * CVE Fix: Update json-path version (apache#15772) Apache Druid brings the dependency json-path which is affected by CVE-2023-51074. Its latest version 2.9.0 fixes the above CVE. Append function has been added to json-path and so the unit test to check for the append function not present has been updated. --------- Co-authored-by: Xavier Léauté <[email protected]> * Update protocol for MemcachedCache (apache#16035) --------- Co-authored-by: Keerthana Srikanth <[email protected]> Co-authored-by: Xavier Léauté <[email protected]>
Description
Apache Druid brings the dependency json-path which is affected by CVE-2023-51074.
Its latest version 2.9.0 fixes the above CVE.
This PR modifies pom file, license file, OrcReaderTest and OWASP Dependency Check suppression file.
Append function has been added to json-path and so the unit test to check for the append function not present has been removed.
Release Note:
JSON-Path upgrade now allows append functionality. However, we do not support json-path append function for ORC format (see #11722). Earlier, if the user tried to use JsonPath function append earlier, it would have not appended the item, but now the same function will return an exception. We are overriding the parse function used when append is invoked. So, row.getDimension("append") results in java.lang.UnsupportedOperationException: Unused coming from
druid/processing/src/main/java/org/apache/druid/java/util/common/parsers/FlattenerJsonProvider.java
This is a potential issue to watch out for when upgrading.
This PR has: