diff options
author | Andrew Donnellan <ajd@linux.ibm.com> | 2020-04-15 19:06:56 +1000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2020-04-18 12:29:56 +0100 |
commit | a9717565031e5a81f2fa7d690e7f6d13e681e3f8 (patch) | |
tree | 146d1f8a30d6dd809a4924406fe316aa6b716a8c /htdocs | |
parent | 162b4adfb2ad7c837db24fad7c7618124500d920 (diff) | |
download | patchwork-a9717565031e5a81f2fa7d690e7f6d13e681e3f8.tar patchwork-a9717565031e5a81f2fa7d690e7f6d13e681e3f8.tar.gz |
parser: Don't crash when From: is list email but has weird mangle format
get_original_sender() tries to demangle DMARC-mangled From headers, in
the case where the email's From address is the list address. It knows how
to handle Google Groups and Mailman style mangling, where the original
submitter's name will be turned into e.g. "Andrew Donnellan via
linuxppc-dev".
If an email has the From header set to the list address but has a name that
doesn't include " via ", we'll throw an exception because stripped_name
hasn't been set. Sometimes this is because the list name is seemingly
empty, resulting in a mangled name like "Andrew Donnellan via"
without the space after "via" that we detect. Handle this as well as we can
instead, and add a test.
Fixes: 8279a84238c10 ("parser: Unmangle From: headers that have been mangled for DMARC purposes")
Reported-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'htdocs')
0 files changed, 0 insertions, 0 deletions