Commit 4b932e81 authored by Medicean's avatar Medicean

(Fix: Database) fix #151 (thx @miaochiahao)

parent e5230965
......@@ -4,6 +4,7 @@
## `v(2.0.7.3)
* 主窗口增加 CSP 策略
* Fix self-xss in database config #151 (thx @miaochiahao)
## `v(2.0.7.2)`
......
......@@ -139,7 +139,7 @@ class ASP {
items.push({
id: `conn::${_}`,
// text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`,
text: conf[_]['type'].toUpperCase(),
text: antSword.noxss(conf[_]['type'].toUpperCase()),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
......
......@@ -124,7 +124,7 @@ class CUSTOM {
items.push({
id: `conn::${_}`,
// text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`,
text: conf[_]['type'].toUpperCase(),
text: antSword.noxss(conf[_]['type'].toUpperCase()),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
......
......@@ -251,7 +251,7 @@ class Database {
data_arr.push({
id: i+1,
data: [
func_mapping.hasOwnProperty(item[0]) ? func_mapping[item[0]] : item[0],
func_mapping.hasOwnProperty(item[0]) ? func_mapping[item[0]] : antSword.noxss(item[0]),
parseInt(item[1]) === 1 ? "√" : "×",
],
style: parseInt(item[1]) === 1 ? "background-color:#ADF1B9": "",
......
......@@ -288,7 +288,7 @@ class PHP {
for (let _ in conf) {
items.push({
id: `conn::${_}`,
text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`,
text: antSword.noxss(`${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment