[NOID] Fixes failing path traversal TeamCity tests #464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picks neo4j-contrib/neo4j-apoc-procedures#3703
What
Checks sequences of
%e%e%f%f%e%e
do not fail but stay on the same directory when trying to do path traversals.Commit 6616a36 reproduces the problem, the next one amends the tests to solve it.
Why
The tests were failing in our TeamCity CI. This treats them as we were treating sequences like
..//..//
They've solved an issue with OpenJDK where it wasn't properly detecting double slashes in a path and turning them into a single one: openjdk/jdk17u@bc9d9c0, https://nvd.nist.gov/vuln/detail/CVE-2023-22049
This fix has gone in Eclipse Temurin 17.0.8, all distributions of Zulu or Oracle v17. The rationale to change it is that most of the JDKs should catch up with this fix, but also if they don't we were still protected throwing a failure.