Redact database password from logging
Change-Id: I5cb137a68ccfc928d0efba0a96c35805d50870e3
This commit is contained in:
parent
d99b767a2a
commit
304f85fd68
@ -289,8 +289,10 @@ class DBHandler(RelationHandler):
|
||||
return
|
||||
|
||||
data = event.relation.data[event.relation.app]
|
||||
# XXX: Let's not log the credentials with the data
|
||||
logger.info(f"Received data: {data}")
|
||||
display_data = {k: v for k, v in data.items()}
|
||||
if "password" in display_data:
|
||||
display_data["password"] = "REDACTED"
|
||||
logger.info(f"Received data: {display_data}")
|
||||
self.callback_f(event)
|
||||
|
||||
def get_relation_data(self) -> dict:
|
||||
|
Loading…
x
Reference in New Issue
Block a user