SteveYurongSu commented on code in PR #15699:
URL: https://github.com/apache/iotdb/pull/15699#discussion_r2156092321
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/connector/payload/thrift/request/PipeTransferCompressedReq.java:
##########
@@ -144,6 +149,17 @@ public static byte[] toTPipeTransferReqBytes(
}
}
+ /** This method is used to prevent decompression bomb attacks. */
+ private static void checkDecompressedLength(final int decompressedLength)
+ throws IllegalArgumentException {
+ if (decompressedLength < 0 || decompressedLength >
MAX_DECOMPRESSED_LENGTH) {
Review Comment:
```suggestion
final int maxDecompressedLength =
PipeConfig.getInstance().getPipeReceiverReqDecompressedMaxLengthInBytes();
if (decompressedLength < 0 || decompressedLength >
maxDecompressedLength) {
```
--
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]