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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-08-20 09:19:35 -07:00 committed by James Valleroy
parent c30b3eb85c
commit e8e2aaf85b
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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):