Merge branch 'feature/new_wms' into 'master'
签名验证(带多余请求) See merge request composer/php-wms-client!1
This commit is contained in:
commit
5dc67b272f
|
@ -611,15 +611,8 @@ class QimenWms extends BaseWms implements WmsInterface
|
|||
if (empty($params)) {
|
||||
return false;
|
||||
}
|
||||
$query = [
|
||||
'method' => $params['method'],
|
||||
'timestamp' => $params['timestamp'],
|
||||
'format' => $params['format'],
|
||||
'app_key' => $params['app_key'],
|
||||
'v' => $params['v'],
|
||||
'sign_method' => $params['sign_method'],
|
||||
'customerId' => $params['customerId'],
|
||||
];
|
||||
$query = $params;
|
||||
unset($query['body'], $query['sign']);
|
||||
$sign = $this->createSign($query, $params['body']);
|
||||
if (!hash_equals((string) $sign, (string) $params['sign'])) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user