Skip to content

Commit

Permalink
修复判断签名格式报错
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Mar 12, 2021
1 parent e79acf9 commit 069754c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/cos-js-sdk-v5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '1.2.6';
COS.version = '1.2.7';

module.exports = COS;

Expand Down Expand Up @@ -7849,7 +7849,7 @@ function getAuthorizationAsync(params, callback) {
var cb = function (err, AuthData) {
if (cbDone) return;
cbDone = true;
if (AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
if (AuthData && AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
AuthData = util.clone(AuthData);
AuthData.SecurityToken = AuthData.XCosSecurityToken;
delete AuthData.XCosSecurityToken;
Expand Down
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-js-sdk-v5",
"version": "1.2.6",
"version": "1.2.7",
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
"main": "index.js",
"types": "types",
Expand Down
2 changes: 1 addition & 1 deletion src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ function getAuthorizationAsync(params, callback) {
var cb = function (err, AuthData) {
if (cbDone) return;
cbDone = true;
if (AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
if (AuthData && AuthData.XCosSecurityToken && !AuthData.SecurityToken) {
AuthData = util.clone(AuthData);
AuthData.SecurityToken = AuthData.XCosSecurityToken;
delete AuthData.XCosSecurityToken;
Expand Down
2 changes: 1 addition & 1 deletion src/cos.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '1.2.6';
COS.version = '1.2.7';

module.exports = COS;

0 comments on commit 069754c

Please sign in to comment.