@@ -154,8 +154,8 @@ class Post(models.Model):
|
|||||||
params={"max": settings.MAX_UPLOAD_SIZE},
|
params={"max": settings.MAX_UPLOAD_SIZE},
|
||||||
)
|
)
|
||||||
# Rate limiting for posts
|
# Rate limiting for posts
|
||||||
# BUG: if a user's last post is deleted, and it is their only post, they
|
# TODO BUG: if a user's last post is deleted, and it is their only post,
|
||||||
# will not hit rate limit. This could probably be abused
|
# they will not hit rate limit. This could probably be abused
|
||||||
last_post = self.board.post_set.filter(ip=self.ip).order_by("-created").first()
|
last_post = self.board.post_set.filter(ip=self.ip).order_by("-created").first()
|
||||||
if last_post:
|
if last_post:
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
|
|||||||
Reference in New Issue
Block a user