mirror of
https://github.com/apache/lucene.git
synced 2025-03-06 00:09:28 +00:00
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…
x
Reference in New Issue
Block a user