refactor(security): mark potential unsafe code paths
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// __UNSAFE__
|
||||
// Reason: potentially setting innerHTML.
|
||||
// This can come from explicit usage of v-html or innerHTML as a prop in render
|
||||
// functions. The user is reponsible for using them with only trusted content.
|
||||
export function patchDOMProp(
|
||||
el: any,
|
||||
key: string,
|
||||
|
||||
@@ -51,6 +51,10 @@ export const nodeOps: Omit<RendererOptions<Node, Element>, 'patchProp'> = {
|
||||
return el.cloneNode(true)
|
||||
},
|
||||
|
||||
// __UNSAFE__
|
||||
// Reason: innerHTML.
|
||||
// Static content here can only come from compiled templates.
|
||||
// As long as the user only uses trusted templates, this is safe.
|
||||
insertStaticContent(content, parent, anchor, isSVG) {
|
||||
const temp = isSVG
|
||||
? tempSVGContainer ||
|
||||
|
||||
Reference in New Issue
Block a user