removing webhook soft-failes in favor for system logging

This commit is contained in:
paulwer 2024-03-24 13:32:52 +01:00
parent d712191012
commit e888cde7dd
2 changed files with 0 additions and 15 deletions

View File

@ -201,11 +201,6 @@ class BrevoController extends BaseController
return response()->json(['message' => 'Failed. Invalid Parameters. At least one item was invalid.'], 400);
}
if (!array_key_exists('Attachments', $item) || count($item['Attachments']) == 0) {
Log::info('Brevo: InboundParsing: SoftFail: Message ignored because of missing attachments. No Actions would have been taken...');
continue;
}
ProcessBrevoInboundWebhook::dispatch($item)->delay(10);
}

View File

@ -120,16 +120,6 @@ class MailgunController extends BaseController
return response()->json(['message' => 'Failed. Missing Parameters. Use store and notify!'], 400);
}
if (!array_key_exists('attachments', $input) || count(json_decode($input['attachments'])) == 0) {
Log::info('Message ignored because of missing attachments. No Actions would have been taken...');
return response()->json(['message' => 'Sucess. Soft Fail. Missing Attachments.'], 200);
}
if (\abs(\time() - (int) $input['timestamp']) > 150) {
Log::info('Message ignored because of request body is too old.');
return response()->json(['message' => 'Success. Soft Fail. Message too old.'], 200);
}
// @turbo124 TODO: how to check for services.mailgun.webhook_signing_key on company level, when custom credentials are defined
// TODO: validation for client mail credentials by recipient
if (\hash_equals(\hash_hmac('sha256', $input['timestamp'] . $input['token'], config('services.mailgun.webhook_signing_key')), $input['signature'])) {