From: Lars Ingebrigtsen Date: Mon, 31 Jan 2022 15:41:32 +0000 (+0100) Subject: Make Gnus address checking more resilient X-Git-Tag: emacs-29.0.90~2621 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90bbf27f02b1e7bf9cc0f0206313795c210c565b;p=emacs.git 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). --- 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)