Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
37f871bb
Commit
37f871bb
authored
Apr 12, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Security:toastr) Fix #147
parent
d8471a1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
CHANGELOG.md
CHANGELOG.md
+7
-1
package-lock.json
package-lock.json
+1
-1
package.json
package.json
+1
-1
toastr.js
static/libs/toastr/toastr.js
+10
-2
No files found.
CHANGELOG.md
View file @
37f871bb
...
@@ -2,7 +2,13 @@
...
@@ -2,7 +2,13 @@
> 有空会补补BUG、添添新功能。
> 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## `v(2.0.8)`
## `v(2.0.7.1)`
### 安全更新 (重要)
*
Fix toastr 输出时未过滤导致的 xss 漏洞, 由于在 webview 中开启了 nodejs 功能, 可借此引起 RCE #147 (thx @ev0A)
> 为了防止插件中 toastr 出现类似问题, 修改了 toastr 可以输出 html 的特点,以后均不支持输出 html
### 其它
### 其它
...
...
package-lock.json
View file @
37f871bb
{
{
"name"
:
"antsword"
,
"name"
:
"antsword"
,
"version"
:
"2.0.7"
,
"version"
:
"2.0.7
.1
"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
...
...
package.json
View file @
37f871bb
{
{
"name"
:
"antsword"
,
"name"
:
"antsword"
,
"version"
:
"2.0.7"
,
"version"
:
"2.0.7
.1
"
,
"description"
:
"中国蚁剑是一款跨平台的开源网站管理工具"
,
"description"
:
"中国蚁剑是一款跨平台的开源网站管理工具"
,
"main"
:
"app.js"
,
"main"
:
"app.js"
,
"dependencies"
:
{
"dependencies"
:
{
...
...
static/libs/toastr/toastr.js
View file @
37f871bb
...
@@ -234,12 +234,20 @@
...
@@ -234,12 +234,20 @@
}
}
if
(
map
.
title
)
{
if
(
map
.
title
)
{
$titleElement
.
append
(
map
.
title
).
addClass
(
options
.
titleClass
);
$titleElement
.
append
(
String
(
map
.
title
)
.
replace
(
/&/g
,
"&"
)
.
replace
(
/>/g
,
">"
)
.
replace
(
/</g
,
"<"
)
.
replace
(
/"/g
,
"""
)).
addClass
(
options
.
titleClass
);
$toastElement
.
append
(
$titleElement
);
$toastElement
.
append
(
$titleElement
);
}
}
if
(
map
.
message
)
{
if
(
map
.
message
)
{
$messageElement
.
append
(
map
.
message
).
addClass
(
options
.
messageClass
);
$messageElement
.
append
(
String
(
map
.
message
)
.
replace
(
/&/g
,
"&"
)
.
replace
(
/>/g
,
">"
)
.
replace
(
/</g
,
"<"
)
.
replace
(
/"/g
,
"""
)).
addClass
(
options
.
messageClass
);
$toastElement
.
append
(
$messageElement
);
$toastElement
.
append
(
$messageElement
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment