mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-31 03:50:11 -07:00
Fix regex masking in logger args
This commit is contained in:
parent
505cf25ca3
commit
b3b2752554
1 changed files with 9 additions and 3 deletions
|
@ -131,9 +131,15 @@ class RegexFilter(logging.Filter):
|
||||||
|
|
||||||
args = []
|
args = []
|
||||||
for arg in record.args:
|
for arg in record.args:
|
||||||
matches = self.regex.findall(arg) if isinstance(arg, str) else []
|
try:
|
||||||
for match in matches:
|
arg_str = str(arg)
|
||||||
arg = self.replace(arg, match)
|
matches = self.regex.findall(arg_str)
|
||||||
|
if matches:
|
||||||
|
for match in matches:
|
||||||
|
arg_str = self.replace(arg_str, match)
|
||||||
|
arg = arg_str
|
||||||
|
except:
|
||||||
|
pass
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
record.args = tuple(args)
|
record.args = tuple(args)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue