Skip to content

Commit

Permalink
Fix #134 修复部分 self-xss 引起的体验问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Medicean committed Mar 20, 2019
1 parent c2f5432 commit ae69902
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/modules/filemanager/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Files {
for(let gb in global_bookmarks) {
bookmark_opts.push({
id: 'bookmark_'+ global_bookmarks[gb],
text: gb,
text: antSword.noxss(gb),
icon: 'bookmark',
type: 'button',
enabled: manager.path !== global_bookmarks[gb]
Expand All @@ -47,7 +47,7 @@ class Files {
for (let _ in bookmark) {
bookmark_opts.push({
id: 'bookmark_' + _,
text: bookmark[_],
text: antSword.noxss(bookmark[_]),
icon: 'bookmark-o',
type: 'button',
enabled: manager.path !== _
Expand Down
2 changes: 1 addition & 1 deletion source/modules/shellmanager/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
data.push({
id: _['_id'],
data: [
_['url'], _['ip'], _['addr'], _['note'],
antSword.noxss(_['url']), _['ip'], _['addr'], antSword.noxss(_['note']),
new Date(_['ctime']).format('yyyy/MM/dd hh:mm:ss'),
new Date(_['utime']).format('yyyy/MM/dd hh:mm:ss')
]
Expand Down
2 changes: 1 addition & 1 deletion source/modules/shellmanager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ShellManager {
this.category['sidebar'].addItem({
id: _,
bubble: _data['category'][_],
text: `<i class="fa fa-folder-o"></i> ${_}`
text: `<i class="fa fa-folder-o"></i> ${antSword.noxss(_)}`
});
}
// 加载分类数据
Expand Down

0 comments on commit ae69902

Please sign in to comment.