mirror of
https://github.com/bitwarden/server
synced 2026-02-25 00:52:57 +00:00
Validate loaded user's org matches pass-in organization when resetting password (#7019)
This commit is contained in:
@@ -227,7 +227,7 @@ public class OrganizationUsersController : BaseAdminConsoleController
|
||||
public async Task<OrganizationUserResetPasswordDetailsResponseModel> GetResetPasswordDetails(Guid orgId, Guid id)
|
||||
{
|
||||
var organizationUser = await _organizationUserRepository.GetByIdAsync(id);
|
||||
if (organizationUser is null || organizationUser.UserId is null)
|
||||
if (organizationUser is null || organizationUser.OrganizationId != orgId || organizationUser.UserId is null)
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user