Loading gettor/services/email/sendmail.py +6 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,11 @@ class Sendmail(object): yield self.conn.remove_request( id=id, service="email", date=date ) log.error("Error sending email: {}.".format(e)) log.error( strings.redact_emails("Error sending email:{}.".format(e)) ) except Exception as e: log.error("Error sending email: {}.".format(e)) log.error( strings.redact_emails("Error sending email:{}.".format(e)) ) gettor/utils/strings.py +5 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ the Tor Browser. import json import os import inspect import re strings = {} translations = {} Loading Loading @@ -115,6 +116,10 @@ def load_strings(current_locale): strings[s] = translations[current_locale][s] def redact_emails(text): redacted_text = re.sub(r'[\w\.+-]+@[\w\.+-]+', '[REDACTED_EMAIL]', text) return redacted_text def translated(k): """ Loading Loading
gettor/services/email/sendmail.py +6 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,11 @@ class Sendmail(object): yield self.conn.remove_request( id=id, service="email", date=date ) log.error("Error sending email: {}.".format(e)) log.error( strings.redact_emails("Error sending email:{}.".format(e)) ) except Exception as e: log.error("Error sending email: {}.".format(e)) log.error( strings.redact_emails("Error sending email:{}.".format(e)) )
gettor/utils/strings.py +5 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ the Tor Browser. import json import os import inspect import re strings = {} translations = {} Loading Loading @@ -115,6 +116,10 @@ def load_strings(current_locale): strings[s] = translations[current_locale][s] def redact_emails(text): redacted_text = re.sub(r'[\w\.+-]+@[\w\.+-]+', '[REDACTED_EMAIL]', text) return redacted_text def translated(k): """ Loading