Mercurial > prosody-hg
comparison util/prosodyctl/check.lua @ 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 | 6c59b9072871 |
| children | f7de36fed53c |
comparison
equal
deleted
inserted
replaced
| 13707:6c59b9072871 | 13708:9f8e9aabc00b |
|---|---|
| 926 return (n:gsub("%.$", "")); | 926 return (n:gsub("%.$", "")); |
| 927 end | 927 end |
| 928 | 928 |
| 929 local unknown_addresses = set.new(); | 929 local unknown_addresses = set.new(); |
| 930 | 930 |
| 931 for jid in enabled_hosts() do | 931 local function is_valid_domain(domain) |
| 932 return idna.to_ascii(domain) ~= nil; | |
| 933 end | |
| 934 | |
| 935 for jid in it.filter(is_valid_domain, enabled_hosts()) do | |
| 932 local all_targets_ok, some_targets_ok = true, false; | 936 local all_targets_ok, some_targets_ok = true, false; |
| 933 local node, host = jid_split(jid); | 937 local node, host = jid_split(jid); |
| 934 | 938 |
| 935 local modules, component_module = modulemanager.get_modules_for_host(host); | 939 local modules, component_module = modulemanager.get_modules_for_host(host); |
| 936 if component_module then | 940 if component_module then |
