mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix(editor): Prevent XSS in node-issues tooltip (#9490)
This commit is contained in:
parent
0deb7d0fcc
commit
301e846cf6
|
@ -180,6 +180,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import xss from 'xss';
|
||||
import { useStorage } from '@/composables/useStorage';
|
||||
import {
|
||||
CUSTOM_API_CALL_KEY,
|
||||
|
@ -467,11 +468,9 @@ export default defineComponent({
|
|||
if (nodeExecutionRunData) {
|
||||
nodeExecutionRunData.forEach((executionRunData) => {
|
||||
if (executionRunData?.error) {
|
||||
issues.push(
|
||||
`${executionRunData.error.message}${
|
||||
executionRunData.error.description ? ` (${executionRunData.error.description})` : ''
|
||||
}`,
|
||||
);
|
||||
const { message, description } = executionRunData.error;
|
||||
const issue = `${message}${description ? ` (${description})` : ''}`;
|
||||
issues.push(xss(issue));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue