]> git.eshelyaron.com Git - emacs.git/commitdiff
Make Gnus address checking more resilient
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 31 Jan 2022 15:41:32 +0000 (16:41 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 31 Jan 2022 15:41:32 +0000 (16:41 +0100)
* 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

index 08e1a6f93eabb0ed98737e623e75537f16f6574c..59c3bbc76edf9d6a051ad353252bb5a58d504395 100644 (file)
@@ -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)