Preventing Password logging

Change-Id: I552bd6bf3f9ce9f86ddfbfcc5f835f162d114132
This commit is contained in:
Anand Shanmugam 2016-03-28 16:32:12 -07:00
parent 52e9d7b222
commit 3b9483be34
1 changed files with 3 additions and 0 deletions

View File

@ -645,6 +645,9 @@ class ContextFormatter(logging.Formatter):
else:
record.msg = "Client-side error: Invalid input for field/attribute name"
if "keystone_authtoken.password" in record.args:
record.args = ("keystone_authtoken.password","****")
if not isinstance(record.msg, six.text_type):
record.msg = six.text_type(record.msg)