From 37395dfb23cf6d82561a8709df673e571cd18f56 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 4 Jul 2021 01:33:53 +0200 Subject: 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. --- util/prosodyctl/check.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/prosodyctl/check.lua') 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"); -- cgit v1.2.3