Re: [PR] fix: validate internal tsfile paths for files only [iotdb]

2026-08-10 Thread via GitHub


jt2594838 merged PR #18417:
URL: https://github.com/apache/iotdb/pull/18417


-- 
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]



Re: [PR] fix: validate internal tsfile paths for files only [iotdb]

2026-08-06 Thread via GitHub


Caideyipi commented on code in PR #18417:
URL: https://github.com/apache/iotdb/pull/18417#discussion_r3733897669


##
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java:
##
@@ -94,6 +94,10 @@ public static LoadTsFileStatement createForPipe(String 
filePath) throws FileNotF
   private LoadTsFileStatement(
   String filePath, boolean validateSourcePath, boolean 
validateInternalDataDir)
   throws FileNotFoundException {
+if (filePath == null || filePath.isEmpty()) {

Review Comment:
   [P1] Table Model 的 `LOAD` 路径没有经过这里的空路径校验。
   
   关系型解析器 `AstBuilder.visitLoadTsFileStatement()` 会直接构造 `LoadTsFile`;该类的构造函数只检查 
`null`,随后执行 `processTsFile(new File(filePath), ...)`。因此关系型语法 `LOAD ''` 
仍会把空字符串解析成进程当前工作目录,可能递归扫描并加载其中的 `.tsfile`(至少也不会返回本 PR 新增的“LOAD TSFILE path 
cannot be empty”错误)。`RelationalSql.g4` 的 `STRING` 规则允许空字符串。
   
   请把校验抽成字符串级 helper,在 `LoadTsFileStatement` 和 `LoadTsFile` 两个入口复用,并补充 
Tree/Table 两种 dialect 的 `LOAD ''` 回归测试。



-- 
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]



[PR] fix: validate internal tsfile paths for files only [iotdb]

2026-08-06 Thread via GitHub


luoluoyuyu opened a new pull request, #18417:
URL: https://github.com/apache/iotdb/pull/18417

   ## Description
   
   
   
   
   
   
   
   
   
   
   
   
   
   This PR has:
   - [ ] been self-reviewed.
   - [ ] concurrent read
   - [ ] concurrent write
   - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious 
 for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold 
 for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   
   
   
   
   # Key changed/added classes (or packages if there are too many classes) 
in this PR
   


-- 
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]