mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FIX: do not allow unbound membership lookups
Previously we would allow looking up membership limits in an unbound way via the API, this introduces an upper limit of 1000 per page.
This commit is contained in:
@ -211,6 +211,10 @@ class GroupsController < ApplicationController
|
||||
raise Discourse::InvalidParameters.new(:limit)
|
||||
end
|
||||
|
||||
if limit > 1000
|
||||
raise Discourse::InvalidParameters.new(:limit)
|
||||
end
|
||||
|
||||
if offset < 0
|
||||
raise Discourse::InvalidParameters.new(:offset)
|
||||
end
|
||||
|
Reference in New Issue
Block a user