daviftorres commented on code in PR #12937:
URL: https://github.com/apache/cloudstack/pull/12937#discussion_r3016853805


##########
server/src/main/java/com/cloud/user/DomainManagerImpl.java:
##########
@@ -1074,7 +1074,7 @@ protected void 
validateNewParentDomainCanAccessResourcesOfDomainToBeMoved(String
         for (Map.Entry<Long, List<String>> entry : 
idsOfDomainsWithResourcesUsedByDomainToBeMoved.entrySet()) {
             DomainVO domainWithResourceUsedByDomainToBeMoved = 
_domainDao.findById(entry.getKey());
 
-            Pattern pattern = 
Pattern.compile(domainWithResourceUsedByDomainToBeMoved.getPath().replace("/", 
"\\/").concat(".*"));
+            Pattern pattern = 
Pattern.compile(domainWithResourceUsedByDomainToBeMoved.getPath().replace("/", 
"\\/").concat(".*")); // This only scaped one Regex metacharacter (/). The 
wildcard `.` is more common and dangerous in my opinion. 

Review Comment:
   @DaanHoogland ,
   
   I did not propose a fix because I need help for that.



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