@blocklet/sdk 1.16.51-beta-20250905-051437-fe05adb2 → 1.16.52-beta-20250908-085420-224a58fa

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.
@@ -42,9 +42,11 @@ function defaultVerifyToken(req) {
42
42
  if (!req.cookies) {
43
43
  printCookieParserNotInstalledWarning();
44
44
  }
45
- if (req.cookies?.login_token &&
46
- !(0, isEmpty_1.default)(req.cookies['x-csrf-token']) &&
47
- req.cookies['x-csrf-token'] === req.headers['x-csrf-token']) {
45
+ // @note: 如果 login_token 不存在,则跳过 csrf token 的验证
46
+ if (!req.cookies?.login_token) {
47
+ return;
48
+ }
49
+ if (!(0, isEmpty_1.default)(req.cookies['x-csrf-token']) && req.cookies['x-csrf-token'] === req.headers['x-csrf-token']) {
48
50
  const csrfTokenFromRequest = req.cookies['x-csrf-token'];
49
51
  if ((0, csrf_1.verify)(wallet.secretKey, csrfTokenFromRequest, req.cookies.login_token)) {
50
52
  return;
package/lib/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const version = "1.16.51";
1
+ declare const version = "1.16.52";
2
2
  export { version };
3
3
  declare const _default: {
4
4
  version: string;
package/lib/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- const version = '1.16.51';
4
+ const version = '1.16.52';
5
5
  exports.version = version;
6
6
  exports.default = { version };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.51-beta-20250905-051437-fe05adb2",
6
+ "version": "1.16.52-beta-20250908-085420-224a58fa",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,19 +27,19 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/constant": "1.16.51-beta-20250905-051437-fe05adb2",
31
- "@abtnode/db-cache": "1.16.51-beta-20250905-051437-fe05adb2",
32
- "@abtnode/util": "1.16.51-beta-20250905-051437-fe05adb2",
30
+ "@abtnode/constant": "1.16.52-beta-20250908-085420-224a58fa",
31
+ "@abtnode/db-cache": "1.16.52-beta-20250908-085420-224a58fa",
32
+ "@abtnode/util": "1.16.52-beta-20250908-085420-224a58fa",
33
33
  "@arcblock/did": "1.24.0",
34
34
  "@arcblock/did-connect-js": "1.24.0",
35
35
  "@arcblock/jwt": "1.24.0",
36
36
  "@arcblock/ws": "1.24.0",
37
- "@blocklet/constant": "1.16.51-beta-20250905-051437-fe05adb2",
38
- "@blocklet/env": "1.16.51-beta-20250905-051437-fe05adb2",
37
+ "@blocklet/constant": "1.16.52-beta-20250908-085420-224a58fa",
38
+ "@blocklet/env": "1.16.52-beta-20250908-085420-224a58fa",
39
39
  "@blocklet/error": "^0.2.5",
40
- "@blocklet/meta": "1.16.51-beta-20250905-051437-fe05adb2",
41
- "@blocklet/server-js": "1.16.51-beta-20250905-051437-fe05adb2",
42
- "@blocklet/theme": "^3.1.34",
40
+ "@blocklet/meta": "1.16.52-beta-20250908-085420-224a58fa",
41
+ "@blocklet/server-js": "1.16.52-beta-20250908-085420-224a58fa",
42
+ "@blocklet/theme": "^3.1.36",
43
43
  "@did-connect/authenticator": "^2.2.8",
44
44
  "@did-connect/handler": "^2.2.8",
45
45
  "@nedb/core": "^2.1.5",
@@ -85,5 +85,5 @@
85
85
  "ts-node": "^10.9.1",
86
86
  "typescript": "^5.6.3"
87
87
  },
88
- "gitHead": "cadff492e3858895a3e0565b0b1778f166fb34f7"
88
+ "gitHead": "400eda55fc1058c961fd622907237a649b5c4f86"
89
89
  }