diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-10 21:34:09 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-10 21:34:09 -0400 |
commit | 2ce53de77725127fb93d8f9b443648e5a58b2cf2 (patch) | |
tree | 08867a83295789dc1c6df8a87d89a62bf35b13cf | |
parent | 084f3978c0c86aedf01fc245ffdd95e6ed694d14 (diff) | |
download | b4-2ce53de77725127fb93d8f9b443648e5a58b2cf2.tar.gz |
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 <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |