From d9866029a2aab2c5f001100813c0425b4905fdf6 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Mon, 20 Aug 2018 12:31:16 -0400 Subject: [PATCH] Avoid logging passwords on connection events Change-Id: I15c8c4a1177c363283281d2fed63545658eda5de Closes-Bug: #1787214 --- oslo_messaging/_drivers/impl_rabbit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index eca6fae31..0dd0595af 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -1145,7 +1145,9 @@ class Connection(object): # connection is in a known error state. Otherwise attempting to access # the connection's socket while it is in an error state will cause # py-amqp to attempt reconnecting. - info = self.connection.info() + ci = self.connection.info() + info = dict([(k, ci.get(k)) for k in + ['hostname', 'port', 'transport']]) client_port = None if (not conn_error and self.channel and hasattr(self.channel.connection, 'sock')