From 4641e5cf9674d335f87db22dd7e22ec9f35b2953 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 28 Jul 2023 11:53:03 +0200 Subject: [PATCH] textsec: handle email address without domain part * lisp/international/textsec.el (textsec-email-address-suspicious-p): Handle missing domain part. (textsec-email-address-header-suspicious-p): Likewise. (cherry picked from commit 672ca232db0a30e45b7f3f5e06b8fc6f12e23faa) --- lisp/international/textsec.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 86429f15f7c..ce1f6c1d592 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el @@ -395,7 +395,7 @@ suspicious by, respectively, `textsec-local-address-suspicious-p' and `textsec-domain-suspicious-p'." (pcase-let ((`(,local ,domain) (split-string address "@"))) (or - (textsec-domain-suspicious-p domain) + (if domain (textsec-domain-suspicious-p domain)) (textsec-local-address-suspicious-p local)))) (defun textsec-email-address-header-suspicious-p (email) @@ -417,7 +417,7 @@ and `textsec-name-suspicious-p'." (mail-header-parse-address email t) (error (throw 'end "Email address can't be parsed."))))) (or - (textsec-email-address-suspicious-p address) + (and address (textsec-email-address-suspicious-p address)) (and name (textsec-name-suspicious-p name)))))) (defun textsec-url-suspicious-p (url) -- 2.39.5