xieb
2023-08-09 0ebca9c94ac1d55bf04cd2074518146008602dd7
密钥取消长度限制
1 files modified
9 ■■■■■ changed files
skjcmanager/skjcmanager-service/skjcmanager-user/src/main/java/cn/gistack/system/user/sync/util/SecurityUtil.java 9 ●●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-user/src/main/java/cn/gistack/system/user/sync/util/SecurityUtil.java
@@ -58,9 +58,12 @@
        if (isBlank(encryptResultStr)) {
            throw new BusinessException(ErrorCode.CONTENT_EMPTY_ERROR);
        }
        if (secretKey.length() != CimsConstants.SECRET_KEY_LENGTH || !secretKey.matches(CimsConstants.SECRET_KEY_REGEX)) {
            throw new BusinessException(ErrorCode.SECRET_KEY_ERROR);
        }
        if (isBlank(secretKey)) {
            throw new BusinessException(ErrorCode.SECRET_KEY_ERROR);
        }
//        if (secretKey.length() != CimsConstants.SECRET_KEY_LENGTH || !secretKey.matches(CimsConstants.SECRET_KEY_REGEX)) {
//            throw new BusinessException(ErrorCode.SECRET_KEY_ERROR);
//        }
    }