Skip to content

Commit 069754c

Browse files
committed
修复判断签名格式报错
1 parent e79acf9 commit 069754c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

dist/cos-js-sdk-v5.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2221,7 +2221,7 @@ base.init(COS, task);
22212221
advance.init(COS, task);
22222222

22232223
COS.getAuthorization = util.getAuth;
2224-
COS.version = '1.2.6';
2224+
COS.version = '1.2.7';
22252225

22262226
module.exports = COS;
22272227

@@ -7849,7 +7849,7 @@ function getAuthorizationAsync(params, callback) {
78497849
var cb = function (err, AuthData) {
78507850
if (cbDone) return;
78517851
cbDone = true;
7852-
if (AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
7852+
if (AuthData && AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
78537853
AuthData = util.clone(AuthData);
78547854
AuthData.SecurityToken = AuthData.XCosSecurityToken;
78557855
delete AuthData.XCosSecurityToken;

dist/cos-js-sdk-v5.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-js-sdk-v5",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
55
"main": "index.js",
66
"types": "types",

src/base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3058,7 +3058,7 @@ function getAuthorizationAsync(params, callback) {
30583058
var cb = function (err, AuthData) {
30593059
if (cbDone) return;
30603060
cbDone = true;
3061-
if (AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
3061+
if (AuthData && AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
30623062
AuthData = util.clone(AuthData);
30633063
AuthData.SecurityToken = AuthData.XCosSecurityToken;
30643064
delete AuthData.XCosSecurityToken;

src/cos.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ base.init(COS, task);
5959
advance.init(COS, task);
6060

6161
COS.getAuthorization = util.getAuth;
62-
COS.version = '1.2.6';
62+
COS.version = '1.2.7';
6363

6464
module.exports = COS;

0 commit comments

Comments
 (0)