Преглед изворни кода

fix(config): B-37 空白 key 校验收紧,sleep.config.tags 契约 1 红转绿

E2E Test Bot пре 5 дана
родитељ
комит
41f1fc9342

+ 1 - 1
cfc-backend/src/main/java/com/etotem/cfc/controller/config/PublicConfigController.java

@@ -20,7 +20,7 @@ public class PublicConfigController {
     @PostMapping("/value")
     @PostMapping("/value")
     public Result<String> getValue(@RequestBody Map<String, String> params) {
     public Result<String> getValue(@RequestBody Map<String, String> params) {
         String key = params.get("key");
         String key = params.get("key");
-        if (key == null || key.isEmpty()) {
+        if (key == null || key.trim().isEmpty()) {
             return Result.error("key is required");
             return Result.error("key is required");
         }
         }
         String value = sysConfigService.getValue(key);
         String value = sysConfigService.getValue(key);