From 05523677e7574eec399c8842f7191e1df1638d50 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 27 Jun 2022 16:18:46 -0400 Subject: Ignore non-ascii follow-up trailers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The trailer *names* should always be ascii. While it is possible to imagine that some project would have non-ascii trailer names like: Signalé-par: Developpeur Un Co-développé-avec: Developpeur Deux Nonetheless, I am not aware of any project doing this, and this allows us to weed out a bunch of false-positives from bad forwards. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/b4/__init__.py b/b4/__init__.py index b03ed83..c07ee91 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1397,6 +1397,9 @@ class LoreMessage: logger.debug('Ignoring %s (header after other content)', line) continue if followup: + if not tname.isascii(): + logger.debug('Ignoring known non-ascii follow-up trailer: %s', tname) + continue 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) -- cgit v1.2.3