Subject: bug#51733: 27.1; Detect impossible email addresses better

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2022 13:53:59 +0200

> From: Robert Pluim <[email-masked]>
> Cc: Lars Ingebrigtsen <[email-masked]>,  [email-masked]
> Date: Wed, 19 Jan 2022 10:21:22 +0100
> 
>     Eli> Does textsec-email-suspicious-p expect non-ASCII email addresses to be
>     Eli> RFC 2047 encoded?  If so, it will not work in the Rmail display
>     Eli> buffers, where email addresses are shown decoded.  For non-ASCII names
>     Eli> the function signals an error.
> 
> It does? Do you have an example? The following works fine

Here:

  (textsec-email-suspicious-p "אבגד <[email-masked]>")
    => (wrong-type-argument stringp nil)

with this backtrace:

  Debugger entered--Lisp error: (wrong-type-argument stringp nil)
    string-search("=?" nil)
    rfc2047-decode-string(nil)
    mail-header-parse-address("אבגד <[email-masked]>" t)
    textsec-email-suspicious-p("אבגד <[email-masked]>")
    (progn (textsec-email-suspicious-p "אבגד <[email-masked]>"))
    eval((progn (textsec-email-suspicious-p "אבגד <[email-masked]>")) t)
    elisp--eval-last-sexp(t)
    eval-last-sexp(t)
    eval-print-last-sexp(nil)
    funcall-interactively(eval-print-last-sexp nil)
    call-interactively(eval-print-last-sexp nil nil)
    command-execute(eval-print-last-sexp)