mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(editor): Prevent clipboard xss injection (#10894)
This commit is contained in:
committed by
GitHub
parent
48294e7ec1
commit
e20ab59c1d
@@ -1,4 +1,4 @@
|
||||
import xss, { friendlyAttrValue } from 'xss';
|
||||
import xss, { escapeAttrValue } from 'xss';
|
||||
import { ALLOWED_HTML_ATTRIBUTES, ALLOWED_HTML_TAGS } from '@/constants';
|
||||
|
||||
/*
|
||||
@@ -22,7 +22,7 @@ export function sanitizeHtml(dirtyHtml: string) {
|
||||
if (name === 'href' && !value.match(/^https?:\/\//gm)) {
|
||||
return '';
|
||||
}
|
||||
return `${name}="${friendlyAttrValue(value)}"`;
|
||||
return `${name}="${escapeAttrValue(value)}"`;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user