aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-04 01:33:53 +0200
committerKim Alvefur <zash@zash.se>2021-07-04 01:33:53 +0200
commit37395dfb23cf6d82561a8709df673e571cd18f56 (patch)
tree123514309d40360dd273359d777e6286919177a0
parent57ac8669053e5d69629f2d5323ddd3b00570fded (diff)
downloadprosody-37395dfb23cf6d82561a8709df673e571cd18f56.tar.gz
prosody-37395dfb23cf6d82561a8709df673e571cd18f56.zip
util.prosodyctl.check: Normalize potential to form without trailing '.'
In some cases you might end up with both 'xmpp.example.com' and 'xmpp.example.com.', which are the same thing so no point in doing the same checks twice.
-rw-r--r--util/prosodyctl/check.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index f2d0d0df..1ed3c37c 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -446,6 +446,8 @@ local function check(arg)
target_hosts:add(host);
end
+ target_hosts = target_hosts / function(target) return target:gsub("%.$", ""); end
+
if target_hosts:contains("localhost") then
print(" Target 'localhost' cannot be accessed from other servers");
target_hosts:remove("localhost");