mirror of https://github.com/apache/lucene.git
SOLR-10031: Un-break the Windows build
This commit is contained in:
parent
7bbb918467
commit
aa5e048cbf
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue