From 5c7e517be2ac509ffcfcf4bf202b96e23f9630da Mon Sep 17 00:00:00 2001
From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
Date: Mon, 9 Sep 2024 10:20:31 +0300
Subject: [PATCH] fix(editor): Fix XSS issue in node error message toast
---
.../components/NodeExecutionErrorMessage.vue | 18 ++++++++++++++++++
.../src/composables/usePushConnection.ts | 15 ++++++---------
.../editor-ui/src/plugins/i18n/locales/en.json | 1 +
3 files changed, 25 insertions(+), 9 deletions(-)
create mode 100644 packages/editor-ui/src/components/NodeExecutionErrorMessage.vue
diff --git a/packages/editor-ui/src/components/NodeExecutionErrorMessage.vue b/packages/editor-ui/src/components/NodeExecutionErrorMessage.vue
new file mode 100644
index 0000000000000..5786495df4eb3
--- /dev/null
+++ b/packages/editor-ui/src/components/NodeExecutionErrorMessage.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/packages/editor-ui/src/composables/usePushConnection.ts b/packages/editor-ui/src/composables/usePushConnection.ts
index 77d7201ca19c4..60de6ad19b1de 100644
--- a/packages/editor-ui/src/composables/usePushConnection.ts
+++ b/packages/editor-ui/src/composables/usePushConnection.ts
@@ -32,7 +32,7 @@ import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import { useCredentialsStore } from '@/stores/credentials.store';
import { useSettingsStore } from '@/stores/settings.store';
import { parse } from 'flatted';
-import { ref } from 'vue';
+import { h, ref } from 'vue';
import { useOrchestrationStore } from '@/stores/orchestration.store';
import { usePushConnectionStore } from '@/stores/pushConnection.store';
import { useExternalHooks } from '@/composables/useExternalHooks';
@@ -42,6 +42,7 @@ import { useI18n } from '@/composables/useI18n';
import { useTelemetry } from '@/composables/useTelemetry';
import type { PushMessageQueueItem } from '@/types';
import { useAssistantStore } from '@/stores/assistant.store';
+import NodeExecutionErrorMessage from '@/components/NodeExecutionErrorMessage.vue';
export function usePushConnection({ router }: { router: ReturnType }) {
const workflowHelpers = useWorkflowHelpers({ router });
@@ -407,16 +408,12 @@ export function usePushConnection({ router }: { router: ReturnType