lower band check as well

This commit is contained in:
Sam 2014-09-22 17:11:04 +10:00
parent 8c74255cbb
commit f625500792

View file

@ -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