From e275dd289437547414b22cda3227305fb6a85854 Mon Sep 17 00:00:00 2001 From: Nicolas Graner Date: Thu, 3 Nov 2022 22:49:43 +0100 Subject: [PATCH] Avoid error when forwarding messages from Rmail * lisp/gnus/message.el (message-mail): Verify that In-Reply-To has a string value before matching it with a regexp. (Bug#59007) --- lisp/gnus/message.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 24cba97718a..3bbd68bdcd7 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7034,6 +7034,7 @@ is a function used to switch to and display the mail buffer." ;; Firefox sends us In-Reply-To headers that are Message-IDs ;; without <> around them. Fix that. (when (and (eq (car h) 'In-Reply-To) + (stringp (cdr h)) ;; Looks like a Message-ID. (string-match-p "\\`[^ @]+@[^ @]+\\'" (cdr h)) (not (string-match-p "\\`<.*>\\'" (cdr h)))) -- 2.39.2