This is an automated email from the ASF dual-hosted git repository. nvazquez pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push: new c1c381fcd16 api: Prevent modifying acl rules order for default ACLs (#6187) c1c381fcd16 is described below commit c1c381fcd16ae9ed44e5bb47a18121ab4b2b534c Author: Pearl Dsilva <pearl1...@gmail.com> AuthorDate: Fri Apr 8 06:01:29 2022 +0530 api: Prevent modifying acl rules order for default ACLs (#6187) --- server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java index 53e113f9509..0b3d4a86a4e 100644 --- a/server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java +++ b/server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java @@ -1145,6 +1145,9 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ } NetworkACLVO acl = _networkACLDao.findById(aclId); Vpc vpc = _entityMgr.findById(Vpc.class, acl.getVpcId()); + if (vpc == null) { + throw new InvalidParameterValueException("Re-ordering rules for a default ACL is prohibited"); + } Account caller = CallContext.current().getCallingAccount(); _accountMgr.checkAccess(caller, null, true, vpc); }