Commit Graph
5740 Commits
Author SHA1 Message Date
renovate[bot] 06c19bd950 chore(deps): update dependency ckeditor5 to v47.4.0 (#3176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 11:21:29 +00:00
renovate[bot] 0d175d38ba chore(deps): update php:8.5-apache docker digest to 33ee34a 2026-01-18 01:13:58 +00:00
renovate[bot] c11e603459 chore(deps): update phpmyadmin:5 docker digest to 43af279 (#3175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 21:45:00 +00:00
renovate[bot] 759b359c09 chore(deps): update dependency phpunit/phpunit to v12.5.6 2026-01-17 12:24:53 +00:00
renovate[bot] 075819c5c2 chore(deps): update dependency php-debugbar/php-debugbar to v3.1.2 2026-01-17 08:57:50 +00:00
renovate[bot] 4756ba31d8 chore(deps): update php:8.5-apache docker digest to 30adf7f 2026-01-17 05:37:02 +00:00
renovate[bot] bc0c64e71b chore(deps): update actions/cache digest to 8b402f5 2026-01-17 02:03:12 +00:00
Adam DaleyandOpenCode 6b53b43a0c Fix PDF Unicode, tab persistence, invoice numbering (#3171)
Fix multiple issues: PDF Unicode, tab persistence, invoice numbering

- Fix #3157: Remove DejaVu Sans as default PDF font to enable proper
  Unicode support for Thai and other Asian languages in PDFs

- Fix #2618: Ensure invoice number (nr) is stored as integer to prevent
  double-padding when displaying in client dashboard vs admin panel

- Fix #2835: Add tab persistence via URL hash so users stay on their
  selected tab (Configuration, Addons, etc.) after page reload

Co-authored-by: OpenCode
2026-01-17 02:02:37 +00:00
Adam Daley 0832ee57d6 Fix double renew on Stripe payment gateway (#3170)
Fix double renew issue on Stripe payment gateway
2026-01-17 01:36:34 +00:00
Adam Daley 8a73888aed Display Before and After invoice content in PDF (#3169)
Fix #3158: Display Before and After invoice content in PDF

The PDF invoice template was missing the code to render text_1 (before
invoice table) and text_2 (after invoice table) fields, even though these
fields are properly stored in the database and passed to the template.

Changes made:
- Added text_1 rendering before the invoice items table
- Added text_2 rendering after the invoice items table but before footer
- Used consistent styling and markdown filter matching HTML templates

The fix resolves the issue where banking details and other notes entered
in the Before/After Invoice fields were not appearing in PDF invoices.
2026-01-17 01:15:08 +00:00
Adam Daley 711bd07a84 Sort KB articles alphabetically by title (#3168)
Fix: Sort KB articles alphabetically by title (#2882)
2026-01-17 00:57:32 +00:00
Adam Daley 388826d4bd Persist currency selection on installation validation failure (#3167)
Fix: Persist currency selection on installation validation failure (#2746)

- Move currency session storage before validation steps
- Prevents currency from resetting to USD when database connection or admin validation fails
- Ensures consistent behavior with other form fields
2026-01-17 00:45:05 +00:00
Adam Daley 85d0e1ad84 Prevent add funds invoices from being auto-paid with credits (#3164)
Fix: Prevent add funds invoices from being auto-paid with credits

When paying an add funds invoice via Stripe or PayPal, the payment was
processed successfully but the balance would show as /bin/zsh. This happened
because after adding funds to the client balance, the code would also try
to pay the invoice using credits, effectively canceling out the deposit.

The fix adds a check using the existing isInvoiceTypeDeposit() method to
skip the credit payment for deposit invoices, since funds were already
added directly.

Fixes FOSSBilling/FOSSBilling#2988
2026-01-17 00:23:03 +00:00
Adam Daley 7f591040ca Expand Stripe payment status mapping (#3165)
Added additional Stripe charge statuses to the status mapping, ensuring more accurate transaction status handling for cases such as 'requires_action', 'requires_payment_method', 'requires_confirmation', 'requires_capture', 'processing', and 'canceled'.
2026-01-17 00:16:51 +00:00
renovate[bot] c5fc6b10a4 chore(deps): update dependency stripe/stripe-php to v19.2.0 (#3166)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 00:10:58 +00:00
Adam Daley bd616b75cc Fix duplicate updateContacts() call in Client API (#3163)
Fix duplicate updateContacts() call in Client API (#3137)
2026-01-17 00:02:51 +00:00
renovate[bot] 5973e43397 chore(deps): update dependency phpunit/phpunit to v12.5.5 2026-01-16 10:49:07 +00:00
renovate[bot] a34e8cf7c9 chore(deps): update php:8.5-apache docker digest to 78625ce 2026-01-16 08:13:52 +00:00
renovate[bot] 080d834da5 chore(deps): update dependency php-debugbar/php-debugbar to v3.1.0 (#3162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 08:12:48 +00:00
renovate[bot] 668d651e9b chore(deps): update actions/setup-node digest to 6044e13 2026-01-16 02:36:27 +00:00
renovate[bot] 2c2b5a389b chore(deps): update dependency php-debugbar/php-debugbar to v3.0.6 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 21:23:36 +00:00
Adam Daley 08a3919d96 Refactor Javascript and related API functions (#2725)
* chore: Remove jQuery dependencies and update build system

- Remove jQuery from theme dependencies
- Simplify build configuration
- Update documentation to reflect jQuery removal
- Apply PSR-12 code style formatting
- Replace jQuery with vanilla JS in ClientBalance adapter

* refactor: Complete JavaScript API rewrite with modern architecture

- Rewrite API.js with improved URL handling and CSRF management
- Add reusable utility functions in utils.js
- Remove deprecated jQuery-based bb object
- Update Tom Select integration

* feat: Add Twig API functions for declarative API interaction

- Add fb_api(), fb_api_form(), fb_api_link() Twig functions
- Add asset deduplication to prevent duplicate script/style loading

Note: Dashboard/Index module moved to separate refactor/index PR

* refactor: Integrate new API into theme layouts and core templates

- Update theme layouts to use new API functions
- Convert theme partials and macros
- Update core admin module templates (System, Theme, Wysiwyg, Staff)

* refactor: Update module templates to use new API functions

- Replace data-api-* attributes with fb_api_*() Twig functions
- Remove manual CSRF token handling
- Update all module templates for consistency

Note: Index module excluded (moved to refactor/index PR)

* Remove custom ignore rule from phpstan.neon

Deleted a specific ignore rule for ctype_alnum argument count in src/modules/Extension/Service.php, likely because it is no longer needed or the underlying issue has been resolved.
2026-01-14 19:10:24 +00:00
Adam Daley a48c0ec998 Validate gateway_id in IPN and transaction creation (#3159)
* Validate `gateway_id` in IPN and transaction creation

Added input validation for `gateway_id` in `ipn.php` to ensure it is a positive integer, returning a 400 error for invalid values. In ServiceTransaction, now checks if the provided `gateway_id` exists in the database and throws an exception if not, logging a warning for invalid gateway IDs.

* Add logger existence check in `ServiceTransaction`

Ensures that the logger is set before attempting to log a warning when an invalid `gateway_id` is encountered. Also removes an unnecessary `gateway_id` entry from test data in `ServiceTransactionTest`.
2026-01-14 17:49:37 +00:00
Adam Daley 37deea9d38 Add parentheses to SQL WHERE clauses for correct logic (#3156)
Wrapped `OR` conditions in SQL `WHERE` clauses with parentheses across multiple service classes to ensure correct logical grouping and prevent operator precedence issues during search queries.
2026-01-14 14:46:13 +00:00
Adam Daley edd322f2c6 Fix search query logic in Support service (#3155)
Wraps the title and content LIKE conditions in parentheses to ensure correct SQL operator precedence when filtering support entries by search term.
2026-01-14 14:20:03 +00:00
Copilotandadmdly 117eb1979a Improve Docker container practices in Dockerfile (#3153)
* Fix Dockerfile: update PHP version to 8.3 and improve Docker practices

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Revert PHP version back to 8.5 with SHA256 pin

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-14 12:48:12 +00:00
Copilotandadmdly 9d6eb852bf Clean up test code: remove unused variables, duplicate test data, and fix method call (#3152)
* Initial plan

* Remove unused variables and fix test issues in Invoice ServiceTest

- Remove unused $itemInvoiceServiceMock variable from testGetDi()
- Remove duplicate test data for 'id' => 1 in dataForSearchQuery()
- Remove unused $itemInvoiceServiceMock and fix closure in testToApiArray()
- Remove duplicate setDi() call in testOnAfterAdminInvoiceReminderSent()
- Fix incorrect method call to onAfterAdminInvoiceReminderSent()

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Fix test: handle both 'email' and 'Email' service names

The onAfterAdminInvoiceReminderSent method calls mod_service('Email')
with uppercase E, but the test closure was only checking for lowercase
'email'. Updated the closure to handle both cases.

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Fix test: remove return value assertions for void method

The onAfterAdminInvoiceReminderSent method has a void return type,
so the test should not check for a return value. Removed the result
variable and assertions that were expecting a boolean return.

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-14 12:40:24 +00:00
Copilotandadmdly df51900e23 Fix SQL injection vulnerabilities and improve code quality in Invoice Service (#3150)
* Apply security and code quality fixes to Invoice Service

- Rename ambiguous variable 'int' to 'search_numeric_id'
- Fix SQL injection in order IDs batch loading with parameterized queries
- Fix SQL injection in product IDs batch loading with parameterized queries
- Replace hard-coded 'unpaid' with Model_Invoice::STATUS_UNPAID constant
- Rename camelCase 'invoiceIdentifier' to snake_case 'invoice_identifier'

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Improve readability of product lookup logic

Simplify nested ternary operator by extracting product ID lookup into a separate variable for better code readability.

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Fix PHPUnit test for renamed parameter

Update test expectation to use 'search_numeric_id' instead of 'int' to match the code changes that renamed this parameter for better clarity.

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-14 11:52:31 +00:00
Copilotandadmdly 65ab68ca78 Fix Dockerfile: remove unused packages, improve caching, start cron daemon (#3151)
* Fix Dockerfile: update PHP version, remove unused packages, improve caching, and start cron daemon

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Revert PHP version to 8.5-apache with SHA pinning

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-14 10:59:36 +00:00
Copilotandadmdly 1d9193852d Fix lang attribute for i18n, remove duplicate toast container, and extract inline z-index (#3149)
* Fix lang attribute, toast container, and move z-index to CSS

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Add 'zindex' to cspell ignoreWords to fix spellcheck

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-14 10:51:24 +00:00
renovate[bot] ddc7265370 chore(deps): update dependency rector/rector to v2.3.1 2026-01-14 10:39:47 +00:00
renovate[bot] 153676df08 chore(deps): update dependency php-debugbar/php-debugbar to v3.0.3 2026-01-14 10:33:43 +00:00
renovate[bot] ae546153be chore(deps): update phpmyadmin:5 docker digest to e8297ce 2026-01-14 08:34:12 +00:00
Adam Daley 42de2d9ed6 Remove Font Awesome from huraga theme and related modules (#3143)
* Remove Font Awesome from huraga theme and related modules

* Add `aria-hidden` to SVG icons for accessibility

Added the aria-hidden="true" attribute to SVG icons in order button and layout templates to improve accessibility for screen readers.
2026-01-14 08:33:25 +00:00
renovate[bot] f9c158ea2a chore(deps): update php:8.5-apache docker digest to 96b50b7 2026-01-14 02:10:33 +00:00
renovate[bot] 3236afc2dc chore(deps): update dependency bootstrap to v5.3.8 (#3148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 02:09:49 +00:00
Copilotandadmdly 832b364b1f Fix SQL injection vulnerabilities and incorrect method parameter usage in Invoice module (#3147)
* Initial plan

* Fix SQL injection vulnerabilities and incorrect toApiArray parameter usage

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-01-13 22:52:26 +00:00
Adam DaleyandCopilot db28331ecc Replace jQuery with vanilla JS in PayPalEmail adapter (#3146)
* Replace jQuery with vanilla JS in `PayPalEmail` adapter

Removes jQuery dependency for auto-redirect functionality by using
document.addEventListener('DOMContentLoaded', ...) instead of .ready()

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:17:21 +00:00
Adam Daley b2152a2e12 Extend PurgeCSS safelist for Bootstrap utility classes (#3145)
Adds safelist patterns for:
- btn-, card-, badge-, form- components
- text-, bg-, d-, m-, p-, w-, h- utilities
- border-, flex-, justify-, align- utilities
- offcanvas-, accordion-, carousel- components
2026-01-13 18:10:00 +00:00
Adam DaleyandCopilot a0b3158b30 PHPUnit test-legacy refactor and cleanup (#3144)
* PHPUnit test-legacy cleanup

Refactor and cleanup the legacy PHPUnit tests.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 17:32:09 +00:00
renovate[bot]andAdam Daley 68d98bdb61 chore(deps): lock file maintenance (#3140)
* chore(deps): lock file maintenance

* chore(deps): lock file maintenance

* Update PHP 8.2 to 8.3 to complete transition

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-01-13 09:47:54 +00:00
renovate[bot]andAdam Daley 064b89c15d fix(deps): update dependency php-debugbar/php-debugbar to v3 (#3141)
* fix(deps): update dependency php-debugbar/php-debugbar to v3

* Add `php-debugbar/twig-bridge` and update dependencies

Added `php-debugbar/twig-bridge` to `composer.json` and updated several dependencies to their latest versions, including doctrine/collections, doctrine/orm, dompdf/php-svg-lib, monolog/monolog, php-debugbar/php-debugbar, pimple/pimple, prinsfrank/standards, sabberworm/php-css-parser, symfony/* packages, and others. These updates improve compatibility, security, and feature support.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-01-13 09:31:26 +00:00
renovate[bot] b3c6e6a71a chore(deps): update github/codeql-action digest to cdefb33 2026-01-13 01:51:46 +00:00
renovate[bot] 05c20d9a9a chore(deps): update dependency bootstrap to v5.3.8 (#3139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 03:15:49 +00:00
renovate[bot] 99af11855c chore(deps): lock file maintenance (#3138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 03:09:57 +00:00
renovate[bot] 063d40b09c chore(deps): update dependency sass-embedded to v1.97.2 2026-01-10 09:43:21 +00:00
renovate[bot] fd25e940fc chore(deps): update phpmyadmin:5 docker digest to 0d745e2 2026-01-10 04:39:50 +00:00
renovate[bot] 52fa9f1d7e chore(deps): update php:8.5-apache docker digest to ceff122 2026-01-10 02:01:55 +00:00
renovate[bot]andAdam Daley 23641e1dde chore(deps): update streetsidesoftware/cspell-action digest to 24fa8d3 (#3134)
* chore(deps): update streetsidesoftware/cspell-action digest to 24fa8d3

* Update PHPStan config to ignore `ctype_alnum` argument count

Added a new ignore rule in `phpstan.neon` for the 'Function ctype_alnum invoked with 1 parameter, 0 required' message in src/modules/Extension/Service.php. Minor formatting change in `phpstan-baseline.neon`.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-01-09 15:03:10 +00:00
renovate[bot] aa072fdbc4 chore(deps): update dependency sass to v1.97.2 2026-01-09 00:59:12 +00:00