mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Telegram Trigger Node): Verify Webhook requests (#8383)
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -235,3 +235,9 @@ export function getImageBySize(photos: IDataObject[], size: string): IDataObject
|
||||
export function getPropertyName(operation: string) {
|
||||
return operation.replace('send', '').toLowerCase();
|
||||
}
|
||||
|
||||
export function getSecretToken(this: IHookFunctions | IWebhookFunctions) {
|
||||
// Only characters A-Z, a-z, 0-9, _ and - are allowed.
|
||||
const secret_token = `${this.getWorkflow().id}_${this.getNode().id}`;
|
||||
return secret_token.replace(/[^a-zA-Z0-9\_\-]+/g, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user