forked from indymedia/epicyon
Check that authorized path corresponds with the post being deleted
parent
3d01f3c2af
commit
be84d50759
23
daemon.py
23
daemon.py
|
@ -2592,17 +2592,18 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
removeMessageId=removeMessageId.split('&')[0]
|
removeMessageId=removeMessageId.split('&')[0]
|
||||||
if '/statuses/' in removeMessageId:
|
if '/statuses/' in removeMessageId:
|
||||||
removePostActor=removeMessageId.split('/statuses/')[0]
|
removePostActor=removeMessageId.split('/statuses/')[0]
|
||||||
deleteJson= {
|
if originPathStr in removePostActor:
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
deleteJson= {
|
||||||
'actor': removePostActor,
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
'object': removeMessageId,
|
'actor': removePostActor,
|
||||||
'to': ['https://www.w3.org/ns/activitystreams#Public',removePostActor],
|
'object': removeMessageId,
|
||||||
'cc': [removePostActor+'/followers'],
|
'to': ['https://www.w3.org/ns/activitystreams#Public',removePostActor],
|
||||||
'type': 'Delete'
|
'cc': [removePostActor+'/followers'],
|
||||||
}
|
'type': 'Delete'
|
||||||
if self.server.debug:
|
}
|
||||||
pprint(deleteJson)
|
if self.server.debug:
|
||||||
self._postToOutbox(deleteJson)
|
pprint(deleteJson)
|
||||||
|
self._postToOutbox(deleteJson)
|
||||||
self._redirect_headers(originPathStr+'/outbox',cookie)
|
self._redirect_headers(originPathStr+'/outbox',cookie)
|
||||||
self.server.POSTbusy=False
|
self.server.POSTbusy=False
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue