diff --git a/app/Http/Requests/Design/StoreDesignRequest.php b/app/Http/Requests/Design/StoreDesignRequest.php index 248e17522e49..7ff8141c0cd3 100644 --- a/app/Http/Requests/Design/StoreDesignRequest.php +++ b/app/Http/Requests/Design/StoreDesignRequest.php @@ -47,6 +47,8 @@ class StoreDesignRequest extends Request $input['design']['task'] = ''; } + $input['design'] = htmlspecialchars($input['design']); + $this->replace($input); } } diff --git a/app/Jobs/Cron/RecurringInvoicesCron.php b/app/Jobs/Cron/RecurringInvoicesCron.php index 55999756233e..716799a9b8c2 100644 --- a/app/Jobs/Cron/RecurringInvoicesCron.php +++ b/app/Jobs/Cron/RecurringInvoicesCron.php @@ -37,7 +37,7 @@ class RecurringInvoicesCron public function handle() : void { /* Get all invoices where the send date is less than NOW + 30 minutes() */ - info("Sending recurring invoices {Carbon::now()->format('Y-m-d h:i:s')}"); + info("Sending recurring invoices ".Carbon::now()->format('Y-m-d h:i:s')); if (! config('ninja.db.multi_db_enabled')) { diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index 4de14177282a..a23002984172 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -16,6 +16,7 @@ use App\Events\Invoice\InvoiceWasPaid; use App\Factory\PaymentFactory; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use App\Models\Client; +use App\Models\ClientContact; use App\Models\ClientGatewayToken; use App\Models\CompanyGateway; use App\Models\Invoice; @@ -192,4 +193,21 @@ class BaseDriver extends AbstractPaymentDriver } }); } + + /** + * Return the contact if possible. + * + * @return ClientContact The ClientContact object + */ + public function getContact() + { + if ($this->invitation) { + return ClientContact::find($this->invitation->client_contact_id); + } elseif (auth()->guard('contact')->user()) { + return auth()->user(); + } else { + return false; + } + } + }