From d8c9ea741bfd41d5876e564435062b5018971855 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 9 Jan 2022 21:47:04 +0100 Subject: util.prosodyctl.cert: Fix boolean logic bug Boolean logic, never correct on the first try. We want to skip copying the same cert if it _has_ been imported already, not if it has not. --- util/prosodyctl/cert.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/prosodyctl/cert.lua b/util/prosodyctl/cert.lua index 4461182d..4779fdc4 100644 --- a/util/prosodyctl/cert.lua +++ b/util/prosodyctl/cert.lua @@ -223,7 +223,7 @@ function cert_commands.import(arg) local imported = {}; for _, host in ipairs(hostnames) do local paths = cm.find_cert_in_index(files_by_name, host); - if paths and not imported[paths.certificate] then + if paths and imported[paths.certificate] then -- One certificate, many mames! table.insert(imported, host); elseif paths then -- cgit v1.2.3