Implement Discord webhook delivery #59
@@ -272,6 +272,9 @@ class DeliverNotificationAction implements ShouldQueue
|
||||
->timeout(10)
|
||||
->post($notificationAction->delivery_url, [
|
||||
'content' => $message,
|
||||
|
|
||||
'allowed_mentions' => [
|
||||
'parse' => [],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ class DeliverNotificationActionTest extends TestCase
|
||||
&& $request->hasHeader('Content-Type', 'application/json')
|
||||
&& $request->data() === [
|
||||
'content' => 'CORE-42 moved from Backlog to Doing by Erica Example: https://kanbangit.test/projects/core/tickets/42 ($unknown)',
|
||||
'allowed_mentions' => [
|
||||
'parse' => [],
|
||||
],
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user
Should fix: Discord receives rendered ticket data from user-controlled fields (
$ticket_title,$project_name,$actor_name) as rawcontent. Withoutallowed_mentions, values like@everyone/<@&role>will create real pings and enable mention-spam. Please include an explicitallowed_mentionspolicy (for example{ "parse": [] }) or sanitize mention tokens before sending.