Skip to content

Commit ebc1244

Browse files
nvazquezbernardodemarco
authored andcommitted
Fix Unauthorised template/ISO list access to the domain/resource admins
In Apache CloudStack, while using the listTemplates and listIsos APIs, Domain Admins and Resource Admins can retrieve templates and ISOs outside their authorized scope when specifying the domainid parameter and the self or selfexecutable values in filter parameter. This results in unintended leakage of information related to those templates and ISOs. However, this issue does not affect accounts of the type User. Co-authored-by: bernardodemarco <bernardomg2004@gmail.com> Co-authored-by: nvazquez <nicovazquez90@gmail.com>
1 parent 857ccb0 commit ebc1244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/api/query/QueryManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ else if (!template.isPublicTemplate() && caller.getType() != Account.Type.ADMIN)
45724572
if (!permittedAccounts.isEmpty()) {
45734573
domain = _domainDao.findById(permittedAccounts.get(0).getDomainId());
45744574
} else {
4575-
domain = _domainDao.findById(Domain.ROOT_DOMAIN);
4575+
domain = _domainDao.findById(caller.getDomainId());
45764576
}
45774577

45784578
setIdsListToSearchCriteria(sc, ids);

0 commit comments

Comments
 (0)