Skip to content

Commit

Permalink
fix(editor): Prevent XSS in node-issues tooltip (#9490)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored and RicardoE105 committed May 24, 2024
1 parent 6bdfaf8 commit 13489b6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/editor-ui/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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));
}
});
}
Expand Down

0 comments on commit 13489b6

Please sign in to comment.