From e0f369f71515008d4a87e2608cec290d05706266 Mon Sep 17 00:00:00 2001 From: GZTime Date: Tue, 22 Aug 2023 19:53:23 +0800 Subject: [PATCH] fix: can not set EnableTrafficCapture --- src/GZCTF/Controllers/EditController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GZCTF/Controllers/EditController.cs b/src/GZCTF/Controllers/EditController.cs index 6ea1e2e85..357f02630 100644 --- a/src/GZCTF/Controllers/EditController.cs +++ b/src/GZCTF/Controllers/EditController.cs @@ -547,7 +547,7 @@ public async Task 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))