From eb65cff4c776a8d3e259f8c96d2918acfe038b6a Mon Sep 17 00:00:00 2001 From: Charles7c Date: Mon, 24 Jun 2024 21:11:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=A7=81=E6=9C=89=E5=AF=86=E9=92=A5=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #76 --- .../java/top/continew/admin/system/model/req/StorageReq.java | 1 - .../continew/admin/system/service/impl/StorageServiceImpl.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/continew-admin-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java b/continew-admin-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java index 2dca57b5..8abbbb45 100644 --- a/continew-admin-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java +++ b/continew-admin-system/src/main/java/top/continew/admin/system/model/req/StorageReq.java @@ -76,7 +76,6 @@ public class StorageReq extends BaseReq { * 私有密钥 */ @Schema(description = "私有密钥", example = "") - @Length(max = 255, message = "私有密钥长度不能超过 {max} 个字符") private String secretKey; /** diff --git a/continew-admin-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java b/continew-admin-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java index 1e920e31..97312df8 100644 --- a/continew-admin-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java +++ b/continew-admin-system/src/main/java/top/continew/admin/system/service/impl/StorageServiceImpl.java @@ -189,6 +189,7 @@ public class StorageServiceImpl extends BaseServiceImpl SecureUtils.decryptByRsaPrivateKey(newSecretKey)); ValidationUtils.throwIfNull(secretKey, "私有密钥解密失败"); + ValidationUtils.throwIf(secretKey.length() > 255, "私有密钥长度不能超过 255 个字符"); req.setSecretKey(secretKey); }