@blocklet/sdk 1.17.3-beta-20251117-102849-8103f298 → 1.17.3-beta-20251117-230305-4637416e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,9 +80,17 @@ async function verifyAccessKey({ token, strictMode }) {
80
80
  }
81
81
  }
82
82
  async function verifyComponentCall({ req, strictMode }) {
83
- const { sig, data } = (0, verify_sign_1.getVerifyData)(req);
84
- if (!sig)
83
+ let sig;
84
+ let data;
85
+ try {
86
+ ({ sig, data } = (0, verify_sign_1.getVerifyData)(req));
87
+ if (!sig)
88
+ return null;
89
+ }
90
+ catch {
91
+ // 所有请求都会调用 verifyComponentCall,所以需要确保 getVerifyData 抛错时,能继续执行后续逻辑
85
92
  return null;
93
+ }
86
94
  if ((await (0, verify_sign_1.verify)(data, sig, { appSk: process.env.BLOCKLET_APP_ASK || process.env.BLOCKLET_APP_SK })) === false) {
87
95
  if (strictMode) {
88
96
  throw new Error('Unauthorized: Invalid signature');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.17.3-beta-20251117-102849-8103f298",
6
+ "version": "1.17.3-beta-20251117-230305-4637416e",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "homepage": "https://www.arcblock.io/docs/blocklet-sdk-nodejs",
9
9
  "main": "lib/index.js",
@@ -26,19 +26,19 @@
26
26
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@abtnode/constant": "1.17.3-beta-20251117-102849-8103f298",
30
- "@abtnode/db-cache": "1.17.3-beta-20251117-102849-8103f298",
31
- "@abtnode/util": "1.17.3-beta-20251117-102849-8103f298",
29
+ "@abtnode/constant": "1.17.3-beta-20251117-230305-4637416e",
30
+ "@abtnode/db-cache": "1.17.3-beta-20251117-230305-4637416e",
31
+ "@abtnode/util": "1.17.3-beta-20251117-230305-4637416e",
32
32
  "@arcblock/did": "^1.27.7",
33
33
  "@arcblock/did-connect-js": "^1.27.7",
34
34
  "@arcblock/did-ext": "^1.27.7",
35
35
  "@arcblock/jwt": "^1.27.7",
36
36
  "@arcblock/ws": "^1.27.7",
37
- "@blocklet/constant": "1.17.3-beta-20251117-102849-8103f298",
38
- "@blocklet/env": "1.17.3-beta-20251117-102849-8103f298",
37
+ "@blocklet/constant": "1.17.3-beta-20251117-230305-4637416e",
38
+ "@blocklet/env": "1.17.3-beta-20251117-230305-4637416e",
39
39
  "@blocklet/error": "^0.3.3",
40
- "@blocklet/meta": "1.17.3-beta-20251117-102849-8103f298",
41
- "@blocklet/server-js": "1.17.3-beta-20251117-102849-8103f298",
40
+ "@blocklet/meta": "1.17.3-beta-20251117-230305-4637416e",
41
+ "@blocklet/server-js": "1.17.3-beta-20251117-230305-4637416e",
42
42
  "@blocklet/theme": "^3.2.6",
43
43
  "@did-connect/authenticator": "^2.2.8",
44
44
  "@did-connect/handler": "^2.2.8",
@@ -82,5 +82,5 @@
82
82
  "ts-node": "^10.9.1",
83
83
  "typescript": "^5.6.3"
84
84
  },
85
- "gitHead": "f561ece39d3cd479fc6274cb2895ae5423722b38"
85
+ "gitHead": "91bbcd8cfe4db52306f6ce83b90295c296350a7f"
86
86
  }