summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-art.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-31 16:41:32 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-31 16:41:32 +0100
commit90bbf27f02b1e7bf9cc0f0206313795c210c565b (patch)
treea113179ddaaf3e26979f02fa25f87b76fe7edfa5 /lisp/gnus/gnus-art.el
parent5d40e1be7e9b0dd2238dedb74125eb7a40229e53 (diff)
downloademacs-90bbf27f02b1e7bf9cc0f0206313795c210c565b.tar.gz
emacs-90bbf27f02b1e7bf9cc0f0206313795c210c565b.tar.bz2
emacs-90bbf27f02b1e7bf9cc0f0206313795c210c565b.zip
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).
Diffstat (limited to 'lisp/gnus/gnus-art.el')
-rw-r--r--lisp/gnus/gnus-art.el3
1 files changed, 2 insertions, 1 deletions
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)