From 56ec7cfc84594e1246039d1754aaf7e710500877 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 19 Feb 2020 18:03:06 +0800 Subject: [PATCH] 3.1.0 --- .../gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java index 7304fda2..dc831c79 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java @@ -1,6 +1,7 @@ package com.gitee.sop.gatewaycommon.validate.taobao; +import com.gitee.sop.gatewaycommon.bean.SopConstants; import com.gitee.sop.gatewaycommon.message.ErrorEnum; import com.gitee.sop.gatewaycommon.param.ApiParam; import com.gitee.sop.gatewaycommon.validate.AbstractSigner; @@ -35,6 +36,9 @@ public class TaobaoSigner extends AbstractSigner { @Override public String buildServerSign(ApiParam param, String secret) { String signMethod = param.fetchSignMethod(); + if (signMethod == null) { + signMethod = SopConstants.DEFAULT_SIGN_METHOD; + } SignEncipher signEncipher = signEncipherMap.get(signMethod); if (signEncipher == null) { throw ErrorEnum.ISV_INVALID_SIGNATURE_TYPE.getErrorMeta().getException(signMethod);