mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-12 14:30:42 -08:00
textsec: handle email address without domain part
* lisp/international/textsec.el (textsec-email-address-suspicious-p): Handle missing domain part. (textsec-email-address-header-suspicious-p): Likewise.
This commit is contained in:
parent
ea752667cd
commit
672ca232db
1 changed files with 2 additions and 2 deletions
|
|
@ -395,7 +395,7 @@ suspicious by, respectively, `textsec-local-address-suspicious-p'
|
|||
and `textsec-domain-suspicious-p'."
|
||||
(pcase-let ((`(,local ,domain) (split-string address "@")))
|
||||
(or
|
||||
(textsec-domain-suspicious-p domain)
|
||||
(if domain (textsec-domain-suspicious-p domain))
|
||||
(textsec-local-address-suspicious-p local))))
|
||||
|
||||
(defun textsec-email-address-header-suspicious-p (email)
|
||||
|
|
@ -417,7 +417,7 @@ and `textsec-name-suspicious-p'."
|
|||
(mail-header-parse-address email t)
|
||||
(error (throw 'end "Email address can't be parsed.")))))
|
||||
(or
|
||||
(textsec-email-address-suspicious-p address)
|
||||
(and address (textsec-email-address-suspicious-p address))
|
||||
(and name (textsec-name-suspicious-p name))))))
|
||||
|
||||
(defun textsec-url-suspicious-p (url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue