Skip to content

Commit

Permalink
fix: use UTF8 encoding for webhook JSON (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboniface authored Apr 29, 2024
1 parent d9d07c7 commit c0a0b9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/lib/notifications/agents/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion server/routes/settings/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ notificationRoutes.get('/webhook', (_req, res) => {
...webhookSettings.options,
jsonPayload: JSON.parse(
Buffer.from(webhookSettings.options.jsonPayload, 'base64').toString(
'ascii'
'utf8'
)
),
},
Expand Down

0 comments on commit c0a0b9c

Please sign in to comment.