Fix cross-user job history leak
This commit is contained in:
@@ -1676,6 +1676,9 @@ Canonical profile:
|
||||
[HttpGet("{id:int}/history")]
|
||||
public async Task<ActionResult<List<JobEventDto>>> GetHistory([FromRoute] int id, CancellationToken cancellationToken)
|
||||
{
|
||||
var exists = await _db.JobApplications.AnyAsync(j => j.Id == id, cancellationToken);
|
||||
if (!exists) return NotFound();
|
||||
|
||||
var items = await _db.JobEvents
|
||||
.AsNoTracking()
|
||||
.Where(e => e.JobApplicationId == id)
|
||||
|
||||
Reference in New Issue
Block a user