From 66ce7da18603a1cb0b4f500b6abb83ca264b0ccf Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Mon, 9 Jan 2012 17:42:03 -0800 Subject: fix bug 914049: private key in log Change-Id: Id004257ae425291bb18427c5d9b03602a62da043 --- nova/api/ec2/apirequest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nova/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py index f40be6e2a..156037a87 100644 --- a/nova/api/ec2/apirequest.py +++ b/nova/api/ec2/apirequest.py @@ -108,7 +108,13 @@ class APIRequest(object): response = xml.toxml() xml.unlink() - LOG.debug(response) + + # Don't write private key to log + if self.action != "CreateKeyPair": + LOG.debug(response) + else: + LOG.debug("CreateKeyPair: Return Private Key") + return response def _render_dict(self, xml, el, data): -- cgit