mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-24 18:04:47 +08:00
修复 API接口签名校验参数接口NPE问题,增加必须参数的非空校验处理。
This commit is contained in:
parent
072a76132a
commit
f832c63a8c
@ -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