Merge pull request #319 from mcarlton00/sanitize-url

Sanitize the server URL in log messages
This commit is contained in:
Abby 2020-06-11 01:43:32 +01:00 committed by GitHub
commit d13114f3ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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