feat(core): Use WebCrypto to generate all random numbers and strings (#9786)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-19 13:33:57 +02:00
committed by GitHub
parent cfc4db00e3
commit 65c5609ab5
49 changed files with 254 additions and 214 deletions

View File

@@ -4,6 +4,7 @@ import { snakeCase } from 'lodash-es';
import { useSessionStorage } from '@vueuse/core';
import { N8nButton, N8nInput, N8nTooltip } from 'n8n-design-system/components';
import { randomInt } from 'n8n-workflow';
import type { CodeExecutionMode, INodeExecutionData } from 'n8n-workflow';
import type { BaseTextKey } from '@/plugins/i18n';
@@ -208,7 +209,7 @@ function triggerLoadingChange() {
// Loading phrase change
if (!lastPhraseChange || timestamp - lastPhraseChange >= loadingPhraseUpdateMs) {
loadingPhraseIndex.value = Math.floor(Math.random() * loadingPhrasesCount);
loadingPhraseIndex.value = randomInt(loadingPhrasesCount);
lastPhraseChange = timestamp;
}