From f7d0caa5ac8bc4d95bede90b42dd8f794429fc8f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 30 Aug 2024 17:41:40 +0200 Subject: util.prosodyctl.cert: Ensure old cert is moved out of the way This should make it visible if the move fails --- 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 02c81585..abd2e1d6 100644 --- a/util/prosodyctl/cert.lua +++ b/util/prosodyctl/cert.lua @@ -163,7 +163,7 @@ local function copy(from, to, umask, owner, group) local attrs = lfs.attributes(to); if attrs then -- Move old file out of the way local backup = to..".bkp~"..os.date("%FT%T", attrs.change); - os.rename(to, backup); + assert(os.rename(to, backup)); end -- FIXME friendlier error handling, maybe move above backup back? local input = assert(io.open(from)); -- cgit v1.2.3 From a719f5897c2a488add6dcd63edc47e32de7e6c73 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 31 Jul 2024 22:06:18 +0200 Subject: =?UTF-8?q?mod=5Finvites:=20Fix=20traceback=20when=20token=5Finfo?= =?UTF-8?q?=20isn=E2=80=99t=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mod_invites.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_invites.lua b/plugins/mod_invites.lua index 881b851e..88690f7e 100644 --- a/plugins/mod_invites.lua +++ b/plugins/mod_invites.lua @@ -191,7 +191,7 @@ function get(token, username) type = token_info and token_info.type or "roster"; uri = token_info and token_info.uri or get_uri("roster", username.."@"..module.host, token); additional_data = token_info and token_info.additional_data or nil; - reusable = token_info.reusable; + reusable = token_info and token_info.reusable or false; }, valid_invite_mt); end -- cgit v1.2.3