fix domain_whitelist

This commit is contained in:
Andrew Morgan 2019-04-04 16:01:04 +01:00
parent 3dbad0603f
commit 595d6ecd86

View file

@ -116,12 +116,12 @@ class ServerConfig(Config):
) )
self.federation_domain_whitelist = None self.federation_domain_whitelist = None
if len(federation_domain_whitelist) > 0: if federation_domain_whitelist is not None:
# turn the whitelist into a hash for speed of lookup
self.federation_domain_whitelist = {} self.federation_domain_whitelist = {}
# turn the whitelist into a hash for speed of lookup for domain in federation_domain_whitelist:
for domain in federation_domain_whitelist: self.federation_domain_whitelist[domain] = True
self.federation_domain_whitelist[domain] = True
if self.public_baseurl is not None: if self.public_baseurl is not None:
if self.public_baseurl[-1] != '/': if self.public_baseurl[-1] != '/':