2 Revīzijas ead4ab57ff ... cefbcd33d5

Autors SHA1 Ziņojums Datums
  wangpenghui cefbcd33d5 Merge remote-tracking branch 'origin/On-Premises/v1.0.0' into On-Premises/v1.0.0 10 mēneši atpakaļ
  wangpenghui c961747f3d 添加设备id校验 10 mēneši atpakaļ

+ 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)