No nickname validity check for shared inbox

master
Bob Mottram 2019-08-05 17:18:11 +01:00
parent 6821a4ba31
commit 301c626010
1 changed files with 3 additions and 1 deletions

View File

@ -268,8 +268,10 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
if path.endswith('#main-key'):
path=path.replace('#main-key','')
# is this a shared inbox lookup?
isSharedInbox=False
if path=='/inbox' or path=='/users/inbox' or path=='/sharedInbox':
path='/users/inbox'
isSharedInbox=True
else:
notPersonLookup=['/inbox','/outbox','/outboxarchive', \
'/followers','/following','/featured', \
@ -284,7 +286,7 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
nickname=path.replace('/@','',1)
if not nickname:
return None
if not validNickname(nickname):
if not isSharedInbox and not validNickname(nickname):
return None
if ':' in domain:
domain=domain.split(':')[0]