From eb79252ca086988afcb542de04eae4ad4f133167 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 21 Nov 2026 00:20:16 -0500 Subject: [PATCH] QoL 45: intval and floatval in place of int and float casts and a string cast in place of strval, redirect in place of raw Location headers wherever functions.php is loaded, redirect fallback escapes the URL with json_encode and escapeHtml, escapeHtml for the last htmlspecialchars on a page, and the plain-HTTP cookie notice through flashAlert --- CHANGELOG.md | 1 + admin/backup.php | 2 +- admin/contract_templates.php | 2 +- admin/cron.php | 6 ++-- .../contract_template_form.php | 2 +- .../software_template_bill.php | 2 +- admin/oauth_microsoft_mail_callback.php | 2 +- admin/post/demo_data_model.php | 18 +++++------ admin/post/settings_mail.php | 6 ++-- admin/settings_mail.php | 2 +- admin/update.php | 2 +- agent/client_overview.php | 2 +- agent/contract.php | 2 +- agent/modals/contract/contract_form.php | 2 +- .../payment/payment_saved_method_add.php | 2 +- agent/post/payment.php | 16 +++++----- agent/rack.php | 4 +-- agent/racks.php | 2 +- agent/reports/tax_package.php | 6 ++-- api/v1/enforce_api_rbac.php | 4 +-- api/v1/invoices/create.php | 2 +- api/v1/payments/create.php | 2 +- api/v1/payments/update.php | 2 +- api/v1/quotes/create.php | 2 +- api/v1/recurring_invoices/create.php | 4 +-- client/activity.php | 2 +- client/assets.php | 2 +- client/contracts.php | 2 +- client/documents.php | 2 +- client/invoice.php | 2 +- client/invoices.php | 2 +- client/join.php | 6 ++-- client/kb.php | 2 +- client/login_microsoft.php | 30 +++++++------------ client/login_reset.php | 6 ++-- client/payments.php | 2 +- client/quotes.php | 2 +- client/signup.php | 3 +- client/tickets.php | 2 +- client/unpaid_invoices.php | 6 ++-- functions/api_keys.php | 2 +- functions/app.php | 18 +++++------ functions/asset.php | 2 +- functions/asset_type.php | 6 ++-- functions/auth.php | 4 +-- functions/backup.php | 4 +-- functions/billing_email.php | 2 +- functions/billing_pay.php | 6 ++-- functions/calendar.php | 8 ++--- functions/client_overview.php | 2 +- functions/domain.php | 4 +-- functions/expense_import.php | 4 +-- functions/files.php | 2 +- functions/format.php | 10 +++---- functions/income_import.php | 28 ++++++++--------- functions/mail_graph.php | 2 +- functions/managed.php | 2 +- functions/payments.php | 4 +-- functions/products.php | 2 +- functions/quote_images.php | 8 ++--- functions/report_pdf.php | 2 +- functions/reports.php | 4 +-- functions/request.php | 4 +-- functions/rmm.php | 6 ++-- functions/sanitize.php | 2 +- functions/security.php | 4 +-- functions/settings.php | 2 +- functions/sla.php | 2 +- functions/sms.php | 4 +-- functions/software.php | 4 +-- guest/guest_ajax.php | 4 +-- guest/guest_pay_invoice_stripe.php | 14 ++++----- guest/guest_view_invoice.php | 2 +- guest/kb.php | 5 ++-- includes/auth_check.php | 7 +---- includes/filter_footer.php | 2 +- includes/footer.php | 2 +- includes/load_user_session.php | 4 +-- 78 files changed, 169 insertions(+), 193 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f5e36acc..40631b82f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -438,6 +438,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Pickers: the 78 plain `` to the picker, so one set narrow inside an input group stays narrow. Every select in a window is the picker now - new ones should be too. - Money: the 51 places that called `numfmt_format_currency($currency_format, ...)` themselves - client and vendor lists and pages, payment and credit messages, the client portal's home, the guest card payment page, and the report, dashboard and search helpers - call `billingMoney($amount, $currency)`, the one formatter. Left as they are: `billingMoney()` itself, `reportMoneyWhole()` (whole amounts), the trip rate (more decimals) and the localization settings' sample. - Windows: submit buttons say Create on new-record windows and Save on edit windows; Add stays where a window adds existing things to the record it names. Every field `