mirror of
https://gitee.com/dromara/sa-token.git
synced 2024-12-02 11:57:40 +08:00
!261 修复 API接口签名校验参数接口NPE问题,增加必须参数的非空校验处理。
Merge pull request !261 from KonBAI/dev
This commit is contained in:
commit
62f92e9097
@ -315,6 +315,11 @@ public class SaSignTemplate {
|
||||
String nonceValue = paramMap.get(nonce);
|
||||
String signValue = paramMap.get(sign);
|
||||
|
||||
// 三个参数必须全部非空
|
||||
SaSignException.throwByNull(timestampValue, "缺少 timestamp 字段");
|
||||
SaSignException.throwByNull(nonceValue, "缺少 nonce 字段");
|
||||
SaSignException.throwByNull(signValue, "缺少 sign 字段");
|
||||
|
||||
// 依次校验三个参数
|
||||
checkTimestamp(Long.parseLong(timestampValue));
|
||||
if(getSignConfigOrGlobal().getIsCheckNonce()) {
|
||||
|
Loading…
Reference in New Issue
Block a user