minor changes

This commit is contained in:
paulwer 2024-03-24 13:10:45 +01:00
parent ad964ca61a
commit d712191012
3 changed files with 5 additions and 4 deletions

View File

@ -185,9 +185,9 @@ class BrevoController extends BaseController
{ {
$input = $request->all(); $input = $request->all();
// TODO: validation for client credentials by recipient // TODO: validation for client mail credentials by recipient
// if (!($request->has('token') && $request->get('token') == config('services.brevo.secret'))) if (!($request->has('token') && $request->get('token') == config('services.brevo.secret')))
// return response()->json(['message' => 'Unauthorized'], 403); return response()->json(['message' => 'Unauthorized'], 403);
if (!array_key_exists('items', $input)) { if (!array_key_exists('items', $input)) {
Log::info('Failed: Message could not be parsed, because required parameters are missing.'); Log::info('Failed: Message could not be parsed, because required parameters are missing.');

View File

@ -131,6 +131,7 @@ class MailgunController extends BaseController
} }
// @turbo124 TODO: how to check for services.mailgun.webhook_signing_key on company level, when custom credentials are defined // @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'])) { if (\hash_equals(\hash_hmac('sha256', $input['timestamp'] . $input['token'], config('services.mailgun.webhook_signing_key')), $input['signature'])) {
ProcessMailgunInboundWebhook::dispatch($input["recipient"] . "|" . $input["message-url"])->delay(10); ProcessMailgunInboundWebhook::dispatch($input["recipient"] . "|" . $input["message-url"])->delay(10);

View File

@ -156,7 +156,7 @@ class IngresEmailEngine
{ {
// Skipping executions: will not result in not saving Metadata to prevent usage of these conditions, to spam // Skipping executions: will not result in not saving Metadata to prevent usage of these conditions, to spam
if (!$this->validateExpenseShouldProcess()) { if (!$this->validateExpenseShouldProcess()) {
$this->log('email parsing not active for this company. from: ' . $this->email->from); $this->log('mailbox not active for this company. from: ' . $this->email->from);
return; return;
} }
if (!$this->validateExpenseSender()) { if (!$this->validateExpenseSender()) {