forked from indymedia/epicyon
Removing posts
parent
47c2a592b0
commit
de62b155d9
20
daemon.py
20
daemon.py
|
@ -11456,7 +11456,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
self._benchmarkPOSTtimings(POSTstartTime, POSTtimings, 7)
|
self._benchmarkPOSTtimings(POSTstartTime, POSTtimings, 7)
|
||||||
|
|
||||||
if authorized:
|
if not authorized:
|
||||||
|
if self.path.endswith('/rmpost'):
|
||||||
|
print('ERROR: attempt to remove post was not authorized. ' +
|
||||||
|
self.path)
|
||||||
|
self._400()
|
||||||
|
self.server.POSTbusy = False
|
||||||
|
return
|
||||||
|
else:
|
||||||
# a vote/question/poll is posted
|
# a vote/question/poll is posted
|
||||||
if self.path.endswith('/question') or \
|
if self.path.endswith('/question') or \
|
||||||
'/question?page=' in self.path:
|
'/question?page=' in self.path:
|
||||||
|
@ -11488,11 +11495,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
# removes a post
|
# removes a post
|
||||||
if self.path.endswith('/rmpost'):
|
if self.path.endswith('/rmpost'):
|
||||||
print('ERROR: attempt to remove post was not authorized. ' +
|
if '/users/' not in self.path:
|
||||||
self.path)
|
print('ERROR: attempt to remove post was not authorized. ' +
|
||||||
self._400()
|
self.path)
|
||||||
self.server.POSTbusy = False
|
self._400()
|
||||||
return
|
self.server.POSTbusy = False
|
||||||
|
return
|
||||||
if self.path.endswith('/rmpost'):
|
if self.path.endswith('/rmpost'):
|
||||||
self._removePost(callingDomain, cookie,
|
self._removePost(callingDomain, cookie,
|
||||||
authorized, self.path,
|
authorized, self.path,
|
||||||
|
|
Loading…
Reference in New Issue