mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
abuse limits on bulk apis
This commit is contained in:
@ -347,6 +347,11 @@ namespace Bit.Api.Controllers
|
||||
[HttpPost("{id}/import")]
|
||||
public async Task Import(string id, [FromBody]ImportOrganizationUsersRequestModel model)
|
||||
{
|
||||
if(model.Groups.Count() > 200 || model.Users.Count() > 1000)
|
||||
{
|
||||
throw new BadRequestException("You cannot import this much data at once.");
|
||||
}
|
||||
|
||||
var orgIdGuid = new Guid(id);
|
||||
if(!_currentContext.OrganizationAdmin(orgIdGuid))
|
||||
{
|
||||
|
Reference in New Issue
Block a user