zrlw commented on a change in pull request #9248:
URL: https://github.com/apache/dubbo/pull/9248#discussion_r751948299



##########
File path: 
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/AbstractConfiguratorListener.java
##########
@@ -103,21 +103,27 @@ public void process(ConfigChangedEvent event) {
     }
 
     private boolean genConfiguratorsFromRawRule(String rawConfig) {
-        boolean parseSuccess = true;
+        List<URL> urls;
         try {
             // parseConfigurators will recognize app/service config 
automatically.
-            List<URL> urls = ConfigParser.parseConfigurators(rawConfig);
-            List<URL> safeUrls = urls.stream()
-                .map(url -> url.removeParameters(securityKey))
-                .map(url -> url.setScopeModel(moduleModel))
-                .collect(Collectors.toList());
-            configurators = 
Configurator.toConfigurators(safeUrls).orElse(configurators);
+            urls = ConfigParser.parseConfigurators(rawConfig);
         } catch (Exception e) {
-            logger.error("Failed to parse raw dynamic config and it will not 
take effect, the raw config is: " +
-                    rawConfig, e);
-            parseSuccess = false;
+            // support single ip (issue: #8821 #9239)
+            URL url = URL.valueOf(rawConfig);

Review comment:
       ok, i'll delete it.
   filtering out single ip address is more complex than i expected, see regex 
pattern of ipv6:
   ```
   
(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))
   ```
   https://ihateregex.io/expr/ipv6/ 




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