@waline/vercel 1.26.4-deta → 1.26.5-deta
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/package.json +53 -53
- package/src/extend/think.js +1 -1
- package/src/service/markdown/xss.js +2 -2
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
2
|
+
"name": "@waline/vercel",
|
|
3
|
+
"version": "1.26.5-deta",
|
|
4
|
+
"description": "vercel server for waline comment system",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"waline",
|
|
7
|
+
"vercel",
|
|
8
|
+
"comment",
|
|
9
|
+
"blog"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"url": "https://github.com/walinejs/waline",
|
|
13
|
+
"directory": "packages/server"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "lizheming <i@imnerd.org>",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@cloudbase/node-sdk": "2.9.1",
|
|
19
|
+
"@koa/cors": "4.0.0",
|
|
20
|
+
"akismet": "2.0.7",
|
|
21
|
+
"deta": "1.1.0",
|
|
22
|
+
"dompurify": "3.0.1",
|
|
23
|
+
"dy-node-ip2region": "1.0.1",
|
|
24
|
+
"fast-csv": "4.3.6",
|
|
25
|
+
"form-data": "4.0.0",
|
|
26
|
+
"jsdom": "21.1.1",
|
|
27
|
+
"jsonwebtoken": "9.0.0",
|
|
28
|
+
"katex": "0.16.4",
|
|
29
|
+
"leancloud-storage": "4.14.0",
|
|
30
|
+
"markdown-it": "13.0.1",
|
|
31
|
+
"markdown-it-emoji": "2.0.2",
|
|
32
|
+
"markdown-it-sub": "1.0.0",
|
|
33
|
+
"markdown-it-sup": "1.0.0",
|
|
34
|
+
"mathjax-full": "3.2.2",
|
|
35
|
+
"node-fetch": "2.6.9",
|
|
36
|
+
"nodemailer": "6.9.1",
|
|
37
|
+
"nunjucks": "3.2.3",
|
|
38
|
+
"phpass": "0.1.1",
|
|
39
|
+
"prismjs": "1.29.0",
|
|
40
|
+
"speakeasy": "2.0.0",
|
|
41
|
+
"think-helper": "1.1.4",
|
|
42
|
+
"think-logger3": "1.3.1",
|
|
43
|
+
"think-model": "1.5.4",
|
|
44
|
+
"think-model-mysql": "1.1.7",
|
|
45
|
+
"think-model-mysql2": "^2.0.0",
|
|
46
|
+
"think-model-postgresql": "1.1.7",
|
|
47
|
+
"think-mongo": "2.2.1",
|
|
48
|
+
"think-router-rest": "1.0.5",
|
|
49
|
+
"thinkjs": "3.2.14",
|
|
50
|
+
"ua-parser-js": "1.0.34"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=14"
|
|
54
|
+
}
|
|
55
55
|
}
|
package/src/extend/think.js
CHANGED
|
@@ -5,13 +5,13 @@ const DOMPurify = createDOMPurify(new JSDOM('').window);
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Add a hook to make all links open a new window
|
|
8
|
-
* and force their rel to be 'noreferrer noopener'
|
|
8
|
+
* and force their rel to be 'nofollow noreferrer noopener'
|
|
9
9
|
*/
|
|
10
10
|
DOMPurify.addHook('afterSanitizeAttributes', function (node) {
|
|
11
11
|
// set all elements owning target to target=_blank
|
|
12
12
|
if ('target' in node && node.href && !node.href.startsWith('about:blank#')) {
|
|
13
13
|
node.setAttribute('target', '_blank');
|
|
14
|
-
node.setAttribute('rel', 'noreferrer noopener');
|
|
14
|
+
node.setAttribute('rel', 'nofollow noreferrer noopener');
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// set non-HTML/MathML links to xlink:show=new
|