From 90d087113115be86ee0b1f1a5caf880c6bd106ae Mon Sep 17 00:00:00 2001 From: Fang Wang Date: Fri, 10 Aug 2012 19:53:13 -0700 Subject: [PATCH] bugCS-15741 InterVlan - User VM's ID should not be revealed in the Error message displayed to the Regular User Account - Error during Static NAT Rule creation. Description: Use the UUID to replace the vmId in the exception message. --- server/src/com/cloud/network/rules/RulesManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/network/rules/RulesManagerImpl.java b/server/src/com/cloud/network/rules/RulesManagerImpl.java index 4f0e06fd6ce..e19581789f6 100755 --- a/server/src/com/cloud/network/rules/RulesManagerImpl.java +++ b/server/src/com/cloud/network/rules/RulesManagerImpl.java @@ -545,8 +545,9 @@ public class RulesManagerImpl implements RulesManager, RulesService, Manager { List idList = new ArrayList(); idList.add(new IdentityProxy(ipAddress, ipAddress.getId(), "ipId")); idList.add(new IdentityProxy(oldIP, oldIP.getId(), "oldipId")); + idList.add(new IdentityProxy("vm_instance", vmId, "vmId")); throw new InvalidParameterValueException("Failed to enable static nat for the ip address with specified ipId" + - " as vm with id: " + vmId + " is already associated with ip with specified oldipId", idList); + " as vm with specified vmId is already associated with ip with specified oldipId", idList); } // unassign old static nat rule s_logger.debug("Disassociating static nat for ip " + oldIP);