mirror of
https://github.com/dataease/dataease.git
synced 2026-06-10 05:36:54 +08:00
fix(漏洞): XSS:多处 v-html 渲染用户可控内容
This commit is contained in:
@@ -77,7 +77,10 @@ export const setColorName = (obj, keyword: string, key?: string, colorKey?: stri
|
||||
keyword +
|
||||
'</span>' +
|
||||
name.substring(index + keyword.length, name.length)
|
||||
obj[colorKey] = textCode
|
||||
obj[colorKey] = DOMPurify.sanitize(textCode, {
|
||||
ALLOWED_TAGS: ['span'],
|
||||
ALLOWED_ATTR: ['class']
|
||||
})
|
||||
return
|
||||
}
|
||||
obj[colorKey] = null
|
||||
|
||||
Reference in New Issue
Block a user