2 Incheckningar ead4ab57ff ... cefbcd33d5

Upphovsman SHA1 Meddelande Datum
  wangpenghui cefbcd33d5 Merge remote-tracking branch 'origin/On-Premises/v1.0.0' into On-Premises/v1.0.0 10 månader sedan
  wangpenghui c961747f3d 添加设备id校验 10 månader sedan

+ 3 - 0
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/utils/KeyFileParseUtils.java

@@ -44,6 +44,9 @@ public class KeyFileParseUtils {
         String expireDate = properties.getProperty("ExpireDate");
         String users = properties.getProperty("Users");
         Sign sign = JsonUtils.jsonStringToBean(signJsonStr, Sign.class);
+        if (!Objects.deepEquals(ServerUtils.getDeviceId(),serverID)) {
+            throw new BackendRuntimeException("The key file signature is invalid.");
+        }
         if (!(Objects.deepEquals(sign.getServerID(),serverID)
                 && Objects.deepEquals(sign.getLicenseDate(),licenseDate)
                 && Objects.deepEquals(sign.getExpireDate(),expireDate)