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:26:49 UTC
lucene-solr:master: SOLR-10031: Un-break the Windows build
Repository: lucene-solr
Updated Branches:
refs/heads/master 7bbb91846 -> aa5e048cb
SOLR-10031: Un-break the Windows build
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/aa5e048c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/aa5e048c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/aa5e048c
Branch: refs/heads/master
Commit: aa5e048cbf7c6fa9e8331c51b5f3331636dd7951
Parents: 7bbb918
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:26:39 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/aa5e048c/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 c127699..d5a3089 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -1427,7 +1427,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) {