diff --git a/daemon.py b/daemon.py index d2a4a2a5..101179ce 100644 --- a/daemon.py +++ b/daemon.py @@ -795,6 +795,11 @@ class PubServer(BaseHTTPRequestHandler): if authorized and '?delete=' in self.path: deleteUrl=self.path.split('?delete=')[1] actor=self.path.split('?delete=')[0] + if actor not in deleteUrl: + # You can only delete your own posts + self.server.GETbusy=False + self._redirect_headers(actor+'/inbox',cookie) + return self.postToNickname=getNicknameFromActor(actor) if not self.server.session: self.server.session= \ diff --git a/webinterface.py b/webinterface.py index d2042ff0..5d47030c 100644 --- a/webinterface.py +++ b/webinterface.py @@ -693,9 +693,11 @@ def individualPostAsHtml(baseDir: str, \ likeStr= \ '' \ '' - deleteStr= \ - '' \ - '' + deleteStr='' + if '/users/'+nickname+'/' in postJsonObject['object']['id']: + deleteStr= \ + '' \ + '' if showIcons: footerStr='