forked from indymedia/epicyon
Use full path when verifying signature
parent
92469ed199
commit
292a2a28e7
|
@ -391,7 +391,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
print('Inbox queue is full')
|
print('Inbox queue is full')
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
#TODO convert headers to dict
|
# Convert the headers needed for signature verification to dict
|
||||||
headersDict={}
|
headersDict={}
|
||||||
headersDict['host']=self.headers['host']
|
headersDict['host']=self.headers['host']
|
||||||
if messageJson.get('actor'):
|
if messageJson.get('actor'):
|
||||||
|
@ -415,10 +415,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname, \
|
nickname, \
|
||||||
self.server.domainFull, \
|
self.server.domainFull, \
|
||||||
messageJson,
|
messageJson,
|
||||||
self.headers['host'],
|
|
||||||
self.headers['signature'],
|
|
||||||
headersDict,
|
headersDict,
|
||||||
'/'+self.path.split('/')[-1],
|
self.path,
|
||||||
|
#'/'+self.path.split('/')[-1],
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
if queueFilename:
|
if queueFilename:
|
||||||
# add json to the queue
|
# add json to the queue
|
||||||
|
|
4
inbox.py
4
inbox.py
|
@ -164,7 +164,7 @@ def validPublishedDate(published) -> bool:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def savePostToInboxQueue(baseDir: str,httpPrefix: str,nickname: str, domain: str,postJsonObject: {},host: str,headers: str,httpHeaders: {},postPath: str,debug: bool) -> str:
|
def savePostToInboxQueue(baseDir: str,httpPrefix: str,nickname: str, domain: str,postJsonObject: {},httpHeaders: {},postPath: str,debug: bool) -> str:
|
||||||
"""Saves the give json to the inbox queue for the person
|
"""Saves the give json to the inbox queue for the person
|
||||||
keyId specifies the actor sending the post
|
keyId specifies the actor sending the post
|
||||||
"""
|
"""
|
||||||
|
@ -223,8 +223,6 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str,nickname: str, domain: str
|
||||||
'postDomain': postDomain,
|
'postDomain': postDomain,
|
||||||
'sharedInbox': sharedInboxItem,
|
'sharedInbox': sharedInboxItem,
|
||||||
'published': published,
|
'published': published,
|
||||||
'host': host,
|
|
||||||
'headers': headers,
|
|
||||||
'httpHeaders': httpHeaders,
|
'httpHeaders': httpHeaders,
|
||||||
'path': postPath,
|
'path': postPath,
|
||||||
'post': postJsonObject,
|
'post': postJsonObject,
|
||||||
|
|
Loading…
Reference in New Issue