diff options
author | Michael Telatynski <7t3chguy@gmail.com> | 2018-06-06 10:35:29 +0100 |
---|---|---|
committer | Michael Telatynski <7t3chguy@gmail.com> | 2018-06-06 10:35:29 +0100 |
commit | 592c16251614da7e055b3d864a5885c20cfd3cd0 (patch) | |
tree | 5f896ba28064331cda53ea34cf02e47067803b8a /synapse | |
parent | redact_uri in two missed log paths (diff) | |
download | synapse-592c16251614da7e055b3d864a5885c20cfd3cd0.tar.xz |
also redact __str__ of ApplicationService used for logging
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/appservice/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index 5fdb579723..d1c598622a 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -292,4 +292,8 @@ class ApplicationService(object): return self.rate_limited def __str__(self): - return "ApplicationService: %s" % (self.__dict__,) + # copy dictionary and redact token fields so they don't get logged + dict_copy = self.__dict__.copy() + dict_copy["token"] = "<redacted>" + dict_copy["hs_token"] = "<redacted>" + return "ApplicationService: %s" % (dict_copy,) |