PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.1.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.1.0
2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 All 42 releases
← All changes | app/Http/Controllers/WebhookController.php +12 -1 1.91.62.1.0 View file →
@@ -77,10 +77,16 @@
77 77 // Sanitize data if needed based on webhook structure
78 78 if (isset($data['name'])) {
79 79 $data['name'] = sanitize_text_field($data['name']);
80 80 }
81 - $webhook->find($id)->saveChanges($data);
82 81
82 + $foundWebhook = $webhook->find($id);
83 + if (!$foundWebhook) {
84 + return $this->sendError(__('Webhook not found', 'fluent-boards'), 404);
85 + }
86 +
87 + $foundWebhook->saveChanges($data);
88 +
83 89 return [
84 90 'webhooks' => $webhook->latest()->get(),
85 91 'message' => __('Successfully updated the webhook', 'fluent-boards'),
86 92 ];
@@ -274,8 +280,13 @@
274 280 $data['board_id'] = [];
275 281 }
276 282
277 283 $webhook = Meta::find($id);
284 +
285 + if (!$webhook || $webhook->object_type !== 'outgoing_webhook') {
286 + return $this->sendError('Outgoing webhook not found.', 404);
287 + }
288 +
278 289 $webhook->value = $data;
279 290 $webhook->save();
280 291
281 292