From 0e01136ab7a7b8f9191509c4208dd1573fd1430a Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Mon, 4 Sep 2023 23:30:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BF=97=E9=82=A6=E6=8E=A5=E5=8F=A3=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E6=89=93=E5=8D=B0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/interceptor/ZbFactoryAccountsInterceptor.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java index 284cde284..2fb146825 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java @@ -50,14 +50,11 @@ public class ZbFactoryAccountsInterceptor implements HandlerInterceptor { params.put("timestamp",timestamp); params.put("v",v); log.info(" 验证参数 {}",bodyJson); - String newSign = QmSignUntil.signTopRequest(params, zbFactoryProperties.getSecretkey(), signMethod, bodyJson.toJSONString()); + String s = body.replaceAll(" +", ""); + String newSign = QmSignUntil.signTopRequest(params, zbFactoryProperties.getSecretkey(), signMethod, s); log.info(" 签名 old {}",sign); log.info(" 新签名 old {}",newSign); - - - String s = body.replaceAll(" +", ""); - String newSign = QmSignUntil.signTopRequest(params, zbFactoryProperties.getSecretkey(), signMethod, s); if(!newSign.equals(sign)){ returnJson(response,JSONObject.toJSONString(R.fail(203,"签名认证失败"))); return false;