diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-04 01:33:53 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-04 01:33:53 +0200 |
commit | 37395dfb23cf6d82561a8709df673e571cd18f56 (patch) | |
tree | 123514309d40360dd273359d777e6286919177a0 /util/prosodyctl/check.lua | |
parent | 57ac8669053e5d69629f2d5323ddd3b00570fded (diff) | |
download | prosody-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.
Diffstat (limited to 'util/prosodyctl/check.lua')
-rw-r--r-- | util/prosodyctl/check.lua | 2 |
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"); |