RockteMQ-AI commented on code in PR #1510:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/1510#discussion_r3754483360


##########
server/src/main/java/org/apache/rocketmq/studio/settings/SettingsService.java:
##########
@@ -48,6 +49,14 @@
 @Service
 public class SettingsService {
 
+    private static final List<byte[]> CLOUD_METADATA_ADDRESSES = List.of(
+            new byte[] {
+                (byte) 0xfd, 0x00, 0x0e, (byte) 0xc2,
+                0x00, 0x00, 0x00, 0x00,
+                0x00, 0x00, 0x00, 0x00,

Review Comment:
   IPv4-mapped IPv6 addresses (e.g. `::ffff:100.100.100.200`) would produce a 
16-byte array from `getAddress()` and bypass the 4-byte Alibaba Cloud check. 
Consider normalizing via `address.getAddress()` → if 16 bytes and starts with 
`::ffff:` prefix, extract the last 4 bytes before comparison. Low risk in 
practice (attacker would need to craft the exact form), but worth a follow-up.



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

Reply via email to