Add validation for maximum ID passed to changesets#index

This commit is contained in:
Tom Hughes 2024-04-11 09:23:06 +01:00
parent e3c43e4a1a
commit d8b468e7a1
2 changed files with 11 additions and 0 deletions

View file

@ -18,6 +18,8 @@ class ChangesetsController < ApplicationController
##
# list non-empty changesets in reverse chronological order
def index
param! :max_id, Integer, :min => 1
@params = params.permit(:display_name, :bbox, :friends, :nearby, :max_id, :list)
if request.format == :atom && @params[:max_id]