Skip to content

Commit

Permalink
fix: can not set EnableTrafficCapture
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Aug 22, 2023
1 parent f8159a9 commit e0f369f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Controllers/EditController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public async Task<IActionResult> UpdateGameChallenge([FromRoute] int id, [FromRo
if (model.IsEnabled == true && !res.Flags.Any() && res.Type != ChallengeType.DynamicContainer)
return BadRequest(new RequestResponse("题目无 flag,不可启用"));

if (res.EnableTrafficCapture && res.Type.IsContainer())
if (model.EnableTrafficCapture is true && !res.Type.IsContainer())
return BadRequest(new RequestResponse("只有容器题目可以进行流量捕获"));

if (model.FileName is not null && string.IsNullOrWhiteSpace(model.FileName))
Expand Down

0 comments on commit e0f369f

Please sign in to comment.