pandaapo commented on code in PR #4572:
URL: https://github.com/apache/eventmesh/pull/4572#discussion_r1402847496


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/WebhookUtil.java:
##########
@@ -49,12 +50,21 @@ public class WebhookUtil {
 
     private static final Map<String, AuthService> AUTH_SERVICES_MAP = new 
ConcurrentHashMap<>();
 
+    private static final String[] ALLOWED_SCHEMES = new String[]{"http", 
"https"};
+
+    private static final UrlValidator URL_VALIDATOR = new 
UrlValidator(ALLOWED_SCHEMES);
+
     public static boolean obtainDeliveryAgreement(final CloseableHttpClient 
httpClient,
         final String targetUrl,
         final String requestOrigin) {
 
         LogUtils.info(log, "obtain webhook delivery agreement for url: {}", 
targetUrl);
 
+        if (isInvalidUrl(targetUrl)) {
+            LogUtils.info(log, "Target url is invalid url: {}", targetUrl);

Review Comment:
   No, you only need to make modifications on this branch and then push again.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to