uros-b commented on code in PR #58226:
URL: https://github.com/apache/spark/pull/58226#discussion_r3841958698
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala:
##########
@@ -3095,6 +3095,22 @@ abstract class CSVSuite
}
}
+ test("SPARK-58946: reject file extensions that are not exactly three
letters") {
+ Seq("abcd", "ab1", "a").foreach { ext =>
Review Comment:
The test checks "abcd", "ab1", and "a" but omits "a/b", the path-separator
case that the PR description explicitly singles out as a security concern (it
would place a directory separator inside a filename component). Since the PR
description treats this as a distinct risk, a test case for it would concretely
validate the fix for that input and is worth adding alongside the others.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]