From 2ce53de77725127fb93d8f9b443648e5a58b2cf2 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Thu, 10 Sep 2020 21:34:09 -0400 Subject: Use a more precise regex for email trailers Still seeing false-positives for personal follow-up trailers, so tighten a regex a bit further to make sure we don't match bogus content. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b4/__init__.py b/b4/__init__.py index d4a67a5..f0d5d24 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1206,7 +1206,7 @@ class LoreMessage: if len(others) and tname in headers: logger.debug('Ignoring %s (header after other content)', line) continue - mperson = re.search(r'<[^>]+>', groups[1]) + mperson = re.search(r'<\S+@\S+\.\S+>', groups[1]) if not mperson and tname not in nonperson: logger.debug('Ignoring %s (not a recognized non-person trailer)', line) continue -- cgit v1.2.3