Validation of params should restrict to max int (#6331)

* FIX: Validation of params should restrict to max int

* FIX: Send status 400 when "page" param isn't between 1 and max int
This commit is contained in:
Gerhard Schlager
2018-09-03 06:45:32 +02:00
committed by Sam
parent 747c9bb47f
commit f33433bf9e
3 changed files with 29 additions and 13 deletions

View File

@ -367,7 +367,6 @@ class ListController < ApplicationController
def build_topic_list_options
options = {}
params[:page] = params[:page].to_i rescue 1
params[:tags] = [params[:tag_id].parameterize] if params[:tag_id].present? && guardian.can_tag_pms?
TopicQuery.public_valid_options.each do |key|