diff --git a/ext/comment/main.php b/ext/comment/main.php index 6f082a76..c71ebc2a 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -146,7 +146,18 @@ class CommentList extends SimpleExtension { } } else if($event->get_arg(0) == "list") { - $this->build_page($event->get_arg(1)); + $page_num = int_escape($event->get_arg(1)); + if($page_num <= 5) { + $this->build_page($page_num); + } + else { + header("HTTP/1.0 403 Blocked"); + $this->theme->display_error($page, + "This page is history~", + "Only the first 5 pages of comments are visible ". + "- 99% of the traffic to older pages was bots, and ". + "they were hammering the database o.o"); + } } } }