From 1e5e85f3ce2439d26ad6f089e149cbf66b4dccc5 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 19 Jan 2022 16:39:13 +0100 Subject: [PATCH] Fix thinko in textsec-url-suspicious-p * lisp/international/textsec.el (textsec-url-suspicious-p): Don't bug out on non-HTTP URLs. --- lisp/international/textsec.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 90c37bf2b3b..4e9fb10ad77 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el @@ -372,7 +372,9 @@ and `textsec-name-suspicious-p'." If it isn't, return nil. If it is, return a string explaining the potential problem." (let ((parsed (url-generic-parse-url url))) - (textsec-domain-suspicious-p (url-host parsed)))) + ;; The URL may not have a domain. + (and (url-host parsed) + (textsec-domain-suspicious-p (url-host parsed))))) (provide 'textsec) -- 2.39.2