Sanitize the server URL in log messages

This commit is contained in:
Matt 2020-06-09 19:53:32 -04:00
parent c39750a429
commit eb34578488

View file

@ -44,11 +44,8 @@ class LogHandler(logging.StreamHandler):
if server.get('AccessToken'): if server.get('AccessToken'):
self.sensitive['Token'].append(server['AccessToken']) self.sensitive['Token'].append(server['AccessToken'])
if server.get('LocalAddress'): if server.get('address'):
self.sensitive['Server'].append(server['LocalAddress'].split('://')[1]) self.sensitive['Server'].append(server['address'].split('://')[1])
if server.get('ManualAddress'):
self.sensitive['Server'].append(server['ManualAddress'].split('://')[1])
self.mask_info = settings('maskInfo.bool') self.mask_info = settings('maskInfo.bool')