From b46d618a6538471447fbbd85ec56f2d037300cf0 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 27 Mar 2020 12:17:05 -0400 Subject: Don't do from-matching on non-email trailers (Backported from master) Don't attempt to match email address on trailers that don't have them (like Fixes:). Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/b4/__init__.py b/b4/__init__.py index 16aa2c6..e61958a 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -607,6 +607,11 @@ class LoreMessage: trailers = set() for tname, tvalue in self.trailers: + # Don't do from-matching on certain trailers like Fixes: + if tname.lower() in ('fixes',): + trailers.add((tname, tvalue)) + continue + tmatch = False namedata = email.utils.getaddresses([tvalue])[0] tfrom = re.sub(r'\+[^@]+@', '@', namedata[1].lower()) -- cgit v1.2.3