Skip to content

Commit

Permalink
Use UTF8 encoding for webhook JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboniface committed Apr 12, 2024
1 parent 0900a95 commit af01f21
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 af01f21

Please sign in to comment.