This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 2a591bd267b Pipe: Added parameter check to handshake of legacy
receiver (#16596)
2a591bd267b is described below
commit 2a591bd267bafc34b776246da5dca7842677e7c2
Author: Caideyipi <[email protected]>
AuthorDate: Thu Oct 16 14:09:51 2025 +0800
Pipe: Added parameter check to handshake of legacy receiver (#16596)
---
.../receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java
index 3edc29e9612..759a65cffa7 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java
@@ -103,6 +103,11 @@ public class IoTDBLegacyPipeReceiverAgent {
final String remoteAddress,
final IPartitionFetcher partitionFetcher,
final ISchemaFetcher schemaFetcher) {
+ if (!validatePipeName(syncIdentityInfo)) {
+ return new TSStatus(TSStatusCode.ILLEGAL_PARAMETER.getStatusCode())
+ .setMessage("Invalid pipeName");
+ }
+
final SyncIdentityInfo identityInfo = new
SyncIdentityInfo(syncIdentityInfo, remoteAddress);
LOGGER.info("Invoke handshake method from client ip = {}",
identityInfo.getRemoteAddress());
@@ -119,6 +124,10 @@ public class IoTDBLegacyPipeReceiverAgent {
return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS, "");
}
+ private boolean validatePipeName(final TSyncIdentityInfo info) {
+ return info.isSetPipeName() &&
!info.getPipeName().contains(File.separator);
+ }
+
private void createConnection(final SyncIdentityInfo identityInfo) {
final long connectionId = connectionIdGenerator.incrementAndGet();
currentConnectionId.set(connectionId);