aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-08-18 11:52:39 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-08-18 11:54:58 -0400
commit347edcdd1e7104484777e286ed30f327de17ff8d (patch)
tree5a274eb43ce074e8311874c9b81747e705fdfaeb
parentc6d850e9d72007a6530ad59beccf02ceee1954ef (diff)
downloadb4-347edcdd1e7104484777e286ed30f327de17ff8d.tar.gz
Require that a trailer is at least 2 chars long
I can't think of any trailers that are shorter than 2 characters, so tweak the regex to avoid one of the possible false positives. Reported-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index a3302a1..6ffbb5c 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -887,7 +887,7 @@ class LoreMessage:
self.trailers.add(('Fixes', tvalue))
# Do we have something that looks like a person-trailer?
- matches = re.findall(r'^\s*([\w-]+):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
+ matches = re.findall(r'^\s*([\w-]{2,}):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
# These are commonly part of patch/commit metadata
badtrailers = ('from', 'author', 'cc')
if matches: