forked from indymedia/epicyon
Allow access to shared inbox
parent
b3d597ae06
commit
6821a4ba31
14
daemon.py
14
daemon.py
|
@ -1125,12 +1125,14 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
nickname=self.path.replace('/users/','').replace('/inbox','')
|
||||
print('DEBUG: '+nickname+ \
|
||||
' was not authorized to access '+self.path)
|
||||
if self.server.debug:
|
||||
print('DEBUG: GET access to inbox is unauthorized')
|
||||
self.send_response(405)
|
||||
self.end_headers()
|
||||
self.server.POSTbusy=False
|
||||
return
|
||||
if self.path!='/inbox':
|
||||
# not the shared inbox
|
||||
if self.server.debug:
|
||||
print('DEBUG: GET access to inbox is unauthorized')
|
||||
self.send_response(405)
|
||||
self.end_headers()
|
||||
self.server.POSTbusy=False
|
||||
return
|
||||
|
||||
# get outbox feed for a person
|
||||
outboxFeed=personBoxJson(self.server.baseDir,self.server.domain, \
|
||||
|
|
4
inbox.py
4
inbox.py
|
@ -86,6 +86,10 @@ def getPersonPubKey(session,personUrl: str,personCache: {},debug: bool) -> str:
|
|||
if not personUrl:
|
||||
return None
|
||||
personUrl=personUrl.replace('#main-key','')
|
||||
if personUrl.endswith('/users/inbox'):
|
||||
if debug:
|
||||
print('DEBUG: Obtaining public key for shared inbox')
|
||||
personUrl=personUrl.replace('/users/inbox','/inbox')
|
||||
personJson = getPersonFromCache(personUrl,personCache)
|
||||
if not personJson:
|
||||
if debug:
|
||||
|
|
Loading…
Reference in New Issue