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 authored and James Valleroy committed 2019-08-21 21:35:16 -04:00
1 parent c30b3eb85c
commit e8e2aaf85b
1 file changed
+5 -1
+5 -1
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):