Skip to content

Commit

Permalink
remove apikey from rss feed uri, and hide email_from as well
Browse files Browse the repository at this point in the history
  • Loading branch information
thezoggy committed Mar 10, 2023
1 parent b7dc150 commit 924d7ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sabnzbd/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,11 @@ def _api_warnings(name, kwargs):
LOG_USER_RE = re.compile(rb"(user|username)\s?=\s?[\S]+", re.I)
LOG_PASS_RE = re.compile(rb"(password)\s?=\s?[\S]+", re.I)
LOG_INI_HIDE_RE = re.compile(
rb"(email_pwd|email_account|email_to|pushover_token|pushover_userkey|pushbullet_apikey|prowl_apikey|growl_password|growl_server|IPv[4|6] address)\s?=\s?[\S]+",
rb"(email_pwd|email_account|email_to|email_from|pushover_token|pushover_userkey|pushbullet_apikey|prowl_apikey|growl_password|growl_server|IPv[4|6] address)\s?=\s?[\S]+",
re.I,
)
LOG_HASH_RE = re.compile(rb"([a-fA-F\d]{25})", re.I)
LOG_FEED_API_RE = re.compile(rb"(uri\s=\s.*r=)([a-z0-9]{32})", re.I)


def _api_showlog(name, kwargs):
Expand All @@ -654,6 +655,7 @@ def _api_showlog(name, kwargs):
log_data = LOG_PASS_RE.sub(b"password=<PASSWORD>", log_data)
log_data = LOG_INI_HIDE_RE.sub(b"\\1 = <REMOVED>", log_data)
log_data = LOG_HASH_RE.sub(b"<HASH>", log_data)
log_data = LOG_FEED_API_RE.sub(b"\\1=<APIKEY>", log_data)

# Try to replace the username
try:
Expand Down

0 comments on commit 924d7ae

Please sign in to comment.