Check that actor owns the object to be deleted

master
Bob Mottram 2019-07-11 22:42:15 +01:00
parent ab475f05f6
commit 93eefb1601
1 changed files with 4 additions and 1 deletions

View File

@ -472,6 +472,9 @@ def receiveDelete(session,handle: str,baseDir: str, \
if debug: if debug:
print('DEBUG: "statuses" missing from object in '+messageJson['type']) print('DEBUG: "statuses" missing from object in '+messageJson['type'])
return False return False
if messageJson['actor'] not in messageJson['object']:
if debug:
print('DEBUG: actor is not the owner of the post to be deleted')
if not os.path.isdir(baseDir+'/accounts/'+handle): if not os.path.isdir(baseDir+'/accounts/'+handle):
print('DEBUG: unknown recipient of like - '+handle) print('DEBUG: unknown recipient of like - '+handle)
# if this post in the outbox of the person? # if this post in the outbox of the person?