aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-27 12:17:05 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-27 12:17:05 -0400
commitb46d618a6538471447fbbd85ec56f2d037300cf0 (patch)
tree530021cbe0cd2849e510008a287b6066bb6941a0
parent6521e15f95bea9d580156b52df7bb855c6765e9e (diff)
downloadb46d618a6538471447fbbd85ec56f2d037300cf0.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py5
1 files changed, 5 insertions, 0 deletions
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())