Skip to content

Commit 4afe8d9

Browse files
committedJul 18, 2023
fix(bug): cannot save challenge info
1 parent ab5677a commit 4afe8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/GZCTF/Controllers/EditController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public async Task<IActionResult> UpdateGameChallenge([FromRoute] int id, [FromRo
519519

520520
bool hintUpdated = model.IsHintUpdated(res.Hints?.GetSetHashCode());
521521

522-
if (res.Type == ChallengeType.DynamicContainer && !model.IsValidFlagTemplate())
522+
if (!string.IsNullOrWhiteSpace(model.FlagTemplate) && res.Type == ChallengeType.DynamicContainer && !model.IsValidFlagTemplate())
523523
return BadRequest(new RequestResponse("flag 复杂度不足,请考虑添加队伍哈希或增加长度"));
524524

525525
res.Update(model);

0 commit comments

Comments
 (0)
Please sign in to comment.