Allow authenticated deletion

master
Bob Mottram 2019-07-17 18:58:08 +01:00
parent a4deb4d504
commit 80bdb7a38b
2 changed files with 4 additions and 5 deletions

View File

@ -402,7 +402,7 @@ python3 epicyon.py --nickname [yournick] --domain [name] \
Deletion of posts in a federated system is not always reliable. Some instances may not implement deletion, and this may be because of the possibility of spurious deletes being sent by an adversary to cause trouble.
To disallow deletion requests on your server set the **--nodeletion** option.
To disallow deletion requests by unauthenticated people on your server set the **--nodeletion** option.
Another complication is that the followers collection may change between the time when a post was created and the time it was deleted, leaving some stranded copies.

View File

@ -206,10 +206,9 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug:
print('DEBUG: handle any unfollow requests')
outboxUndoFollow(self.server.baseDir,messageJson,self.server.debug)
if not self.server.nodeletion:
if self.server.debug:
print('DEBUG: handle delete requests')
outboxDelete(self.server.baseDir,self.server.httpPrefix,messageJson,self.server.debug)
if self.server.debug:
print('DEBUG: handle delete requests')
outboxDelete(self.server.baseDir,self.server.httpPrefix,messageJson,self.server.debug)
if self.server.debug:
print('DEBUG: sending c2s post to named addresses')
print('c2s sender: '+self.postToNickname+'@'+self.server.domain+':'+str(self.server.port))