mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
lower band check as well
This commit is contained in:
@@ -58,7 +58,7 @@ class TopicsController < ApplicationController
|
||||
end
|
||||
|
||||
page = params[:page].to_i
|
||||
if (page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number
|
||||
if (page < 0) || ((page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number)
|
||||
raise Discourse::NotFound
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user