签名验证(带多余请求)
This commit is contained in:
parent
be8aa35ed3
commit
23f43aa727
|
@ -611,15 +611,8 @@ class QimenWms extends BaseWms implements WmsInterface
|
||||||
if (empty($params)) {
|
if (empty($params)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$query = [
|
$query = $params;
|
||||||
'method' => $params['method'],
|
unset($query['body'], $query['sign']);
|
||||||
'timestamp' => $params['timestamp'],
|
|
||||||
'format' => $params['format'],
|
|
||||||
'app_key' => $params['app_key'],
|
|
||||||
'v' => $params['v'],
|
|
||||||
'sign_method' => $params['sign_method'],
|
|
||||||
'customerId' => $params['customerId'],
|
|
||||||
];
|
|
||||||
$sign = $this->createSign($query, $params['body']);
|
$sign = $this->createSign($query, $params['body']);
|
||||||
if (!hash_equals((string) $sign, (string) $params['sign'])) {
|
if (!hash_equals((string) $sign, (string) $params['sign'])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user