forked from indymedia/epicyon
No nickname validity check for shared inbox
This commit is contained in:
1 parent
6821a4ba31
commit
301c626010
1 file changed
+3
-1
@@ -268,8 +268,10 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
|||||||
if path.endswith('#main-key'):
|
if path.endswith('#main-key'):
|
||||||
path=path.replace('#main-key','')
|
path=path.replace('#main-key','')
|
||||||
# is this a shared inbox lookup?
|
# is this a shared inbox lookup?
|
||||||
|
isSharedInbox=False
|
||||||
if path=='/inbox' or path=='/users/inbox' or path=='/sharedInbox':
|
if path=='/inbox' or path=='/users/inbox' or path=='/sharedInbox':
|
||||||
path='/users/inbox'
|
path='/users/inbox'
|
||||||
|
isSharedInbox=True
|
||||||
else:
|
else:
|
||||||
notPersonLookup=['/inbox','/outbox','/outboxarchive', \
|
notPersonLookup=['/inbox','/outbox','/outboxarchive', \
|
||||||
'/followers','/following','/featured', \
|
'/followers','/following','/featured', \
|
||||||
@@ -284,7 +286,7 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
|||||||
nickname=path.replace('/@','',1)
|
nickname=path.replace('/@','',1)
|
||||||
if not nickname:
|
if not nickname:
|
||||||
return None
|
return None
|
||||||
if not validNickname(nickname):
|
if not isSharedInbox and not validNickname(nickname):
|
||||||
return None
|
return None
|
||||||
if ':' in domain:
|
if ':' in domain:
|
||||||
domain=domain.split(':')[0]
|
domain=domain.split(':')[0]
|
||||||
|
|||||||
Reference in new issue
Block a user