You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2017/01/30 08:27:58 UTC

lucene-solr:branch_6x: SOLR-10031: Un-break the Windows build

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 91a620793 -> 9e98100d1


SOLR-10031: Un-break the Windows build

(cherry picked from commit aa5e048)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9e98100d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9e98100d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9e98100d

Branch: refs/heads/branch_6x
Commit: 9e98100d100e53fa3ab40820de1f99fe28105da0
Parents: 91a6207
Author: Jan H�ydahl <ja...@apache.org>
Authored: Mon Jan 30 09:26:39 2017 +0100
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Mon Jan 30 09:27:50 2017 +0100

----------------------------------------------------------------------
 .../src/test/org/apache/solr/handler/TestReplicationHandler.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9e98100d/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index e6501ef..a2178db 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -1429,7 +1429,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
   @Test
   public void doTestIllegalFilePaths() throws Exception {
     // Loop through the file=, cf=, tlogFile= params and prove that it throws exception for path traversal attempts
-    List<String> illegalFilenames = Arrays.asList("/foo/bar", "../dir/traversal", "illegal\rfile\nname\t");
+    String absFile = Paths.get("foo").toAbsolutePath().toString();
+    List<String> illegalFilenames = Arrays.asList(absFile, "../dir/traversal", "illegal\rfile\nname\t");
     List<String> params = Arrays.asList(ReplicationHandler.FILE, ReplicationHandler.CONF_FILE_SHORT, ReplicationHandler.TLOG_FILE);
     for (String param : params) {
       for (String filename : illegalFilenames) {