@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.
- package/lib/middlewares/csrf.js +5 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +10 -10
package/lib/middlewares/csrf.js
CHANGED
|
@@ -42,9 +42,11 @@ function defaultVerifyToken(req) {
|
|
|
42
42
|
if (!req.cookies) {
|
|
43
43
|
printCookieParserNotInstalledWarning();
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
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.
|
|
31
|
-
"@abtnode/db-cache": "1.16.
|
|
32
|
-
"@abtnode/util": "1.16.
|
|
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.
|
|
38
|
-
"@blocklet/env": "1.16.
|
|
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.
|
|
41
|
-
"@blocklet/server-js": "1.16.
|
|
42
|
-
"@blocklet/theme": "^3.1.
|
|
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": "
|
|
88
|
+
"gitHead": "400eda55fc1058c961fd622907237a649b5c4f86"
|
|
89
89
|
}
|