daviftorres commented on code in PR #12937:
URL: https://github.com/apache/cloudstack/pull/12937#discussion_r3311064868
##########
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:
Dear @DaanHoogland , you are correct. This was my intention to point out
that the issue is also present in another line and I was looking for
collaboration because I barely read some of the Java code I see.
--
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]