fix: use UTF8 encoding for webhook JSON (#714)

This commit is contained in:
Joshua M. Boniface
2024-04-29 03:19:01 -04:00
committed by GitHub
parent d9d07c705a
commit c0a0b9c8a8
2 changed files with 2 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ class WebhookAgent
const payloadString = Buffer.from(
this.getSettings().options.jsonPayload,
'base64'
).toString('ascii');
).toString('utf8');
const parsedJSON = JSON.parse(JSON.parse(payloadString));

View File

@@ -275,7 +275,7 @@ notificationRoutes.get('/webhook', (_req, res) => {
...webhookSettings.options,
jsonPayload: JSON.parse(
Buffer.from(webhookSettings.options.jsonPayload, 'base64').toString(
'ascii'
'utf8'
)
),
},