janhoy commented on a change in pull request #22:
URL: https://github.com/apache/solr/pull/22#discussion_r601229309
##########
File path: solr/core/src/test/org/apache/solr/core/TestCoreContainer.java
##########
@@ -549,6 +549,40 @@ public void assertAllowPathWindows() {
assertPathBlocked("\\\\unc-server\\share\\path");
}
+ @Test
+ public void assertAllowPathNormalization() throws Exception {
+ Assume.assumeFalse(OS.isFamilyWindows());
+ System.setProperty("solr.allowPaths", "/var/solr/../solr");
+ CoreContainer cc = init(ALLOW_PATHS_SOLR_XML);
+ cc.assertPathAllowed(Paths.get("/var/solr/foo"));
+ try {
Review comment:
You could get rid of the try-finally here, since assertThrows will not
break the flow but continue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]