From e8e2aaf85bc105b50df249bb489fe814349d702f Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 20 Aug 2019 09:19:35 -0700 Subject: [PATCH] ejabberd: Prevent processing empty domain name When domain name is not set in the config app, currently ejabberd return a list with an empty string as list of domains. This leads to certificates being copied to invalid directory. Fix this by making sure domain name is added to the list only if it is not an empty string. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/ejabberd/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plinth/modules/ejabberd/__init__.py b/plinth/modules/ejabberd/__init__.py index 53718072c..bac011f6e 100644 --- a/plinth/modules/ejabberd/__init__.py +++ b/plinth/modules/ejabberd/__init__.py @@ -162,7 +162,11 @@ def get_domains(): if setup_helper.get_state() == 'needs-setup': return [] - return [config.get_domainname()] + domain_name = config.get_domainname() + if domain_name: + return [domain_name] + + return [] def on_pre_hostname_change(sender, old_hostname, new_hostname, **kwargs):