Changeset

13708:9f8e9aabc00b 13.0

prosodyctl: check: Skip DNS checks for known invalid domains (fixes traceback)
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Feb 2025 16:38:50 +0000
parents 13707:6c59b9072871
children 13709:8822b5e73951 13710:f7de36fed53c
files util/prosodyctl/check.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Sat Feb 15 16:34:16 2025 +0000
+++ b/util/prosodyctl/check.lua	Sat Feb 15 16:38:50 2025 +0000
@@ -928,7 +928,11 @@
 
 		local unknown_addresses = set.new();
 
-		for jid in enabled_hosts() do
+		local function is_valid_domain(domain)
+			return idna.to_ascii(domain) ~= nil;
+		end
+
+		for jid in it.filter(is_valid_domain, enabled_hosts()) do
 			local all_targets_ok, some_targets_ok = true, false;
 			local node, host = jid_split(jid);