Skip to content

Commit c1c381f

Browse files
authored
api: Prevent modifying acl rules order for default ACLs (#6187)
1 parent daa7bdb commit c1c381f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/main/java/com/cloud/network/vpc/NetworkACLServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,9 @@ protected void validateMoveAclRulesData(NetworkACLItemVO ruleBeingMoved, Network
11451145
}
11461146
NetworkACLVO acl = _networkACLDao.findById(aclId);
11471147
Vpc vpc = _entityMgr.findById(Vpc.class, acl.getVpcId());
1148+
if (vpc == null) {
1149+
throw new InvalidParameterValueException("Re-ordering rules for a default ACL is prohibited");
1150+
}
11481151
Account caller = CallContext.current().getCallingAccount();
11491152
_accountMgr.checkAccess(caller, null, true, vpc);
11501153
}

0 commit comments

Comments
 (0)