From bec2a14d4c4d4a91bff2959aac46e557a7ae37d3 Mon Sep 17 00:00:00 2001 From: Ervin Marasigan Date: Sun, 26 Nov 2023 19:54:24 -0600 Subject: [PATCH] fix: add empty checks --- conf.d/03-e2e-policy.cfg.lua | 2 +- prosody.cfg.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.d/03-e2e-policy.cfg.lua b/conf.d/03-e2e-policy.cfg.lua index 88a7ca8..dfed983 100644 --- a/conf.d/03-e2e-policy.cfg.lua +++ b/conf.d/03-e2e-policy.cfg.lua @@ -2,7 +2,7 @@ local stringy = require "stringy" e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") e2e_policy_muc = os.getenv("E2E_POLICY_MUC") -e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST"), ", ") +e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST") or "", ", ") e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server." e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server." e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server." diff --git a/prosody.cfg.lua b/prosody.cfg.lua index 5405242..2fd13f0 100644 --- a/prosody.cfg.lua +++ b/prosody.cfg.lua @@ -3,7 +3,7 @@ local stringy = require "stringy" -admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", "); +admins = stringy.split(os.getenv("PROSODY_ADMINS") or "", ", "); pidfile = "/var/run/prosody/prosody.pid"