From 90bbf27f02b1e7bf9cc0f0206313795c210c565b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 31 Jan 2022 16:41:32 +0100 Subject: [PATCH] Make Gnus address checking more resilient * lisp/gnus/gnus-art.el (article--check-suspicious-addresses): Check that we have an email address before checking the validity (bug#53651). --- lisp/gnus/gnus-art.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 08e1a6f93ea..59c3bbc76ed 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2659,7 +2659,8 @@ If PROMPT (the prefix), prompt for a coding system to use." (dolist (header (mail-header-parse-addresses addresses t)) (when-let* ((address (car (ignore-errors (mail-header-parse-address header)))) - (warning (textsec-suspicious-p address 'email-address))) + (warning (and (string-match "@" address) + (textsec-suspicious-p address 'email-address)))) (goto-char (point-min)) (while (search-forward address nil t) (put-text-property (match-beginning 0) (match-end 0) -- 2.39.5