Skip to content

Commit 182bfb0

Browse files
[Test][Zeta] Preserve raw path in traversal regression test
1 parent 354f1ea commit 182bfb0

File tree

1 file changed

+3
-3
lines changed
  • seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/joblog

1 file changed

+3
-3
lines changed

seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/joblog/JobLogIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void testPathTraversalAttackPrevention() throws IOException, InterruptedE
112112
server.execInContainer(
113113
"sh",
114114
"-c",
115-
"curl -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/log/../../etc/passwd'");
115+
"curl --path-as-is -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/log/../../etc/passwd'");
116116
Assertions.assertEquals(
117117
"400",
118118
result.getStdout().trim(),
@@ -123,7 +123,7 @@ public void testPathTraversalAttackPrevention() throws IOException, InterruptedE
123123
server.execInContainer(
124124
"sh",
125125
"-c",
126-
"curl -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/log/../../../etc/shadow'");
126+
"curl --path-as-is -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/log/../../../etc/shadow'");
127127
Assertions.assertEquals(
128128
"400",
129129
result.getStdout().trim(),
@@ -134,7 +134,7 @@ public void testPathTraversalAttackPrevention() throws IOException, InterruptedE
134134
server.execInContainer(
135135
"sh",
136136
"-c",
137-
"curl -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/logs/../../etc/passwd'");
137+
"curl --path-as-is -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/logs/../../etc/passwd'");
138138
Assertions.assertEquals(
139139
"400",
140140
result.getStdout().trim(),

0 commit comments

Comments
 (0)