This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b10648  return empty line if no email string given
6b10648 is described below

commit 6b106487a18b434e95e1595ce7a2778a90d41936
Author: Daniel Gruno <[email protected]>
AuthorDate: Fri Nov 12 02:04:04 2021 +0100

    return empty line if no email string given
---
 server/plugins/messages.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index 63704a6..fd4aba4 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -90,6 +90,8 @@ def extract_name(addr):
 # anonymise a string of email entries
 def anonymize_mail_address(emailstring):
     out = []
+    if not emailstring:
+        return ""
     # split the email list into individual entries
     for real, addr in email.utils.getaddresses([emailstring]):
         # generate the anonymised entries

Reply via email to