mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
removing webhook soft-failes in favor for system logging
This commit is contained in:
parent
d712191012
commit
e888cde7dd
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user