Skip to content

Commit

Permalink
Do not output admin_password in debug logs
Browse files Browse the repository at this point in the history
Sanitize run_instance's admin_password argument from
nova.rpc 'received' debug logging. Fixes bug 915025.

Change-Id: I9004dee422a9e5411b8e440ab80030849d137dab
  • Loading branch information
ttx committed Jan 24, 2012
1 parent 0fc1840 commit fa10e7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nova/rpc/common.py
Expand Up @@ -107,7 +107,10 @@ def consume_in_thread(self):

def _safe_log(log_func, msg, msg_data):
"""Sanitizes the msg_data field before logging."""
SANITIZE = {'set_admin_password': ('new_pass',)}
SANITIZE = {
'set_admin_password': ('new_pass',),
'run_instance': ('admin_password',),
}
method = msg_data['method']
if method in SANITIZE:
msg_data = copy.deepcopy(msg_data)
Expand Down

0 comments on commit fa10e7a

Please sign in to comment.