Skip to content

Commit 76e9af5

Browse files
committed
修改判断错误的逻辑
1 parent fed9465 commit 76e9af5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sdk/base.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,9 @@ function submitRequest(params, callback) {
20132013
var auth = AuthData.Authorization;
20142014
var formatAllow = false;
20152015
if (auth) {
2016-
if (auth.indexOf('q-sign-algorithm=') > -1 &&
2016+
if (auth.indexOf(' ') > -1) {
2017+
formatAllow = false;
2018+
} else if (auth.indexOf('q-sign-algorithm=') > -1 &&
20172019
auth.indexOf('q-ak=') > -1 &&
20182020
auth.indexOf('q-sign-time=') > -1 &&
20192021
auth.indexOf('q-key-time=') > -1 &&
@@ -2033,7 +2035,7 @@ function submitRequest(params, callback) {
20332035
}
20342036
}
20352037
if (!formatAllow) {
2036-
callback('authorization format error');
2038+
callback('authorization error');
20372039
return;
20382040
}
20392041

0 commit comments

Comments
 (0)