branch: elpa/hyperdrive
commit efcf96425e218004ffd97e6fb3f7438d105c91ea
Author: Joseph Turner <jos...@ushin.org>
Commit: Joseph Turner <jos...@ushin.org>

    Change: (hyperdrive-url-entry) Use textsec.el to check DNS domains
---
 hyperdrive-lib.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 86c72105ac..5934efc0d1 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -250,6 +250,12 @@ empty public-key slot."
                (hyperdrive (pcase host
                              ;; FIXME: Duplicate hyperdrive (one has domain 
and nothing else)
                              ((rx ".") ; Assume host is a DNSLink domain. See 
code for <https://github.com/RangerMauve/hyper-sdk#sdkget>.
+                              (when (textsec-suspicious-p host 'domain)
+                                ;; Check DNSLink domains for suspicious 
characters; don't bother
+                                ;; checking public keys since they're not 
recognizable anyway.
+                                (unless (y-or-n-p
+                                        (format "Suspicious domain: %s; 
continue anyway?" host))
+                                  (user-error "Suspicious domain %s" host)))
                               (hyperdrive-create :domains (list host)))
                              (_  ;; Assume host is a public-key
                               (or (gethash host hyperdrive-hyperdrives)

Reply via email to