You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/17 14:09:00 UTC

[GitHub] [dolphinscheduler] github-code-scanning[bot] commented on a diff in pull request #11762: [Bug] [Common] update IPv4 Pattern

github-code-scanning[bot] commented on code in PR #11762:
URL: https://github.com/apache/dolphinscheduler/pull/11762#discussion_r973590000


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/NetUtils.java:
##########
@@ -183,7 +182,7 @@
         }
         String name = address.getHostAddress();
         return (name != null
-                && IP_PATTERN.matcher(name).matches()
+                && IPAddressUtil.isIPv4LiteralAddress(name)

Review Comment:
   ## Access to unsupported JDK-internal API
   
   Access to unsupported JDK-internal API 'sun.net.util.IPAddressUtil'.
   
   [Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1397)



##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/NetUtils.java:
##########
@@ -32,17 +32,16 @@
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
-import java.util.regex.Pattern;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import sun.net.util.IPAddressUtil;

Review Comment:
   ## Access to unsupported JDK-internal API
   
   Access to unsupported JDK-internal API 'sun.net.util.IPAddressUtil'.
   
   [Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1396)



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org