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

@@ -7,6 +7,7 @@ import type {
INodeTypeDescription,
IWebhookResponseData,
} from 'n8n-workflow';
import { randomString } from 'n8n-workflow';
import { helpscoutApiRequest, helpscoutApiRequestAllItems } from './GenericFunctions';
@@ -140,7 +141,7 @@ export class HelpScoutTrigger implements INodeType {
const body = {
url: webhookUrl,
events,
secret: Math.random().toString(36).substring(2, 15),
secret: randomString(10).toLowerCase(),
};
const responseData = await helpscoutApiRequest.call(