Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon

main
Bob Mottram 2021-06-21 12:10:37 +01:00
commit 539934b90d
1 changed files with 2 additions and 2 deletions

View File

@ -210,8 +210,7 @@ def isBlockedDomain(baseDir: str, domain: str,
if noOfSections > 2: if noOfSections > 2:
shortDomain = domain[noOfSections-2] + '.' + domain[noOfSections-1] shortDomain = domain[noOfSections-2] + '.' + domain[noOfSections-1]
allowFilename = baseDir + '/accounts/allowedinstances.txt' if not brochModeIsActive(baseDir):
if not os.path.isfile(allowFilename):
if blockedCache: if blockedCache:
for blockedStr in blockedCache: for blockedStr in blockedCache:
if '*@' + domain in blockedStr: if '*@' + domain in blockedStr:
@ -231,6 +230,7 @@ def isBlockedDomain(baseDir: str, domain: str,
if '*@' + shortDomain in blockedStr: if '*@' + shortDomain in blockedStr:
return True return True
else: else:
allowFilename = baseDir + '/accounts/allowedinstances.txt'
# instance allow list # instance allow list
if not shortDomain: if not shortDomain:
if domain not in open(allowFilename).read(): if domain not in open(allowFilename).read():