Private GIT

Skip to content
Snippets Groups Projects
Commit 842e0528 authored by Fernando's avatar Fernando
Browse files

Merge pull request #1842 from Thraxis/FIX#1292

FIX#1292 Masking NZB API Keys in logs
parents b3fcae70 6f134dfe
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ class CensoredFormatter(logging.Formatter, object):
if v and len(v) > 0 and v in msg:
msg = msg.replace(v, len(v) * '*')
# Needed because Newznab apikey isn't stored as key=value in a section.
msg = re.sub('apikey\=[^\&]*\&','apikey\=**********\&', msg)
msg = re.sub(r'(r|apikey|api_key)=[^&]*([&\w]?)',r'\1=**********\2', msg)
return msg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment