mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Change logger blacklist to set and unify notifier blacklist keys
This commit is contained in:
parent
31f03e0114
commit
9ba6b230e6
5 changed files with 64 additions and 56 deletions
|
@ -666,15 +666,15 @@ class Config(object):
|
|||
|
||||
def _blacklist(self):
|
||||
""" Add tokens and passwords to blacklisted words in logger """
|
||||
blacklist = []
|
||||
blacklist = set()
|
||||
|
||||
for key, subkeys in self._config.iteritems():
|
||||
for subkey, value in subkeys.iteritems():
|
||||
if isinstance(value, basestring) and len(value.strip()) > 5 and \
|
||||
subkey.upper() not in _WHITELIST_KEYS and any(bk in subkey.upper() for bk in _BLACKLIST_KEYS):
|
||||
blacklist.append(value.strip())
|
||||
blacklist.add(value.strip())
|
||||
|
||||
logger._BLACKLIST_WORDS.extend(blacklist)
|
||||
logger._BLACKLIST_WORDS.update(blacklist)
|
||||
|
||||
def _define(self, name):
|
||||
key = name.upper()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue