From 41ad0b78bcac340d3b8640be30b9e6f2dcf9bf2b Mon Sep 17 00:00:00 2001 From: eltrac Date: Fri, 18 Sep 2026 14:11:25 +0800 Subject: utils.url: valid-http-url? should return false for non-string types --- src/weepinbell/utils/url.clj | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/weepinbell/utils/url.clj b/src/weepinbell/utils/url.clj index 5fe2b78..88c9fea 100644 --- a/src/weepinbell/utils/url.clj +++ b/src/weepinbell/utils/url.clj @@ -10,6 +10,7 @@ host (. IDN toASCII (-> url .getHost (string/replace "www." "")))] (and (string/includes? host ".") ;; do not accept localhost and other non-TLD names (or (= scheme "http") (= scheme "https")))) + (catch ClassCastException _ false) ;; not string (catch MalformedURLException _ false) (catch URISyntaxException _ false))) -- cgit v1.2.3