From 8c48fa52dfa0355d6b67a224eedd2d5061181039 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Mon, 9 Jan 2012 17:42:03 -0800 Subject: Cherry-Pick: fix bug 914049: private key in log Change-Id: If9964b8f790077ee9edc88f42ff22e15b31fa540 --- 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 9a3e559257..803413898c 100644 --- a/nova/api/ec2/apirequest.py +++ b/nova/api/ec2/apirequest.py @@ -96,7 +96,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 v1.2.1