From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DC11C35257 for ; Fri, 2 Oct 2020 23:29:41 +0000 (UTC) Received: by mail.kernel.org (Postfix) id 40DA52074B; Fri, 2 Oct 2020 23:29:41 +0000 (UTC) Received: from [192.168.1.64] (unknown [89.36.78.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 060442072E for ; Fri, 2 Oct 2020 23:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601681381; bh=vR4b0qwtSyig9kErSNDYHuCK28b0lMrDBzz6maqelt4=; h=From:List-Id:To:Subject:Date:In-Reply-To:References:From; b=kUUN7uXp4QIe59/XN9EJpdp4Oggez/OaU1FVWYIj14TkKTWgeTn8gop8UEU1/1E8R SPixQcbcNOVKUTm7DWSZeCVaPcyEZ0GT2LRzrYoLo5JGHxqkC1X2ZqomapZljOXd4Z Lcpw8Je3bUHNPl0CT9nmKhbUAHaLdjFdZDSBlZdU= From: Konstantin Ryabitsev List-Id: To: signatures@kernel.org Subject: [PATCH 06/10] Use a more precise regex for email trailers Date: Fri, 2 Oct 2020 19:29:11 -0400 Message-Id: <20201002232915.1728301-7-konstantin@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002232915.1728301-1-konstantin@linuxfoundation.org> References: <20201002232915.1728301-1-konstantin@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patch-Hashes: v=1; h=sha256; g=9fb829d5e4a860cd64ed14ad3b125e8c8670c719; i=SEYvuEv9Q/Y+2xkREveIaEYyDLv7PaTSbx6wD2MJNKQ=; m=Qa26E03o2rndm4LXLee/Qn6VONtT0gP17RaziQ3DoqU=; p=R0Vl8pkDcvWFwm2HO/ExiWpTjCGrqUYBsdtbkVKwaWk= X-Patch-Sig: m=pgp; i=konstantin@linuxfoundation.org; s=0xB6C41CE35664996C; b=iHUEABYIAB0WIQR2vl2yUnHhSB5njDW2xBzjVmSZbAUCX3e34QAKCRC2xBzjVmSZbCCxAPsFpPu BHIpTnErMJzeDdOQIHy81mEKLLdFykzbLyBpIxwD7BTEkmSrtZ3vOlPefvb1ON/Ebo82Sq3jnK7Iy Fqx6uQs= 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 -- 2.26.2