Commit Graph

84 Commits

Author SHA1 Message Date
johnnyq
c8dab1a7e5 Revert PAyment cleanInput too 2026-08-01 18:48:07 -04:00
johnnyq
23a09f54fc Reworked getFieldById to remove escaping and and reworked everything that uses the function to also escape, was causing double escaping in many places this standardizes the function 2026-08-01 15:33:48 -04:00
johnnyq
75028ba09a Fix some Ticket History gaps 2026-08-01 14:33:37 -04:00
johnnyq
53f45fa008 Fix queued backups never building, per-type retention, and cron connection handling 2026-07-31 16:35:39 -04:00
johnnyq
ae468d6cee Encrypted backups with types, scheduling and CLI restore
Backups are now AES-256 encrypted zips in three types (full, database
only, master key), catalogued in a new backups table, built by cron rather
than the web request, and kept under uploads/backups with retention in the
nightly job. The encryption key is one value per install held in config.php,
never in the database and never in the file name.

Restore is shared by the setup wizard and the new scripts/restore_cli.php,
which is the only path without an upload size limit. It verifies the key and
unpacks the archive before dropping anything, and dumps the current database
first so a failed import is rolled back.

A backup dumps, zips and encrypts for minutes without issuing a query, so on
a server with a short wait_timeout the connection is closed underneath it and
the UPDATE marking the backup complete is what fails - long after the archive
was written correctly. The connection is now held open for the job and
re-established before any write that follows long file work, including the
database phase of a restore. Retention recovers rows a dropped connection
left behind: still Running after six hours becomes Complete if the archive is
on disk, Failed if it is not.

cron.php's own failure path is hardened to match. It recorded job failures
through the same connection the failing job had just killed, so an uncaught
exception ended the dispatch and no trace of the original error survived.
Failures now also echo to stdout, so cron mails something useful when the
database is unreachable.

Security: the setup wizard's restore step is now closed on any install that
has users, whatever config.php says. $config_enable_setup defaulted to
enabled when the flag was absent, and the flag is only written at the end of
a successful install, so an install abandoned partway left an unauthenticated
endpoint that would drop every table, import an attacker-supplied archive,
and overwrite uploads/ including the .htaccess that stops PHP running there.
Affects 26.07 and earlier. Restoring over a live install is now CLI only.
2026-07-31 16:18:20 -04:00
johnnyq
8436cd6296 Nightly tasks: apply late fees, overdue reminder emails, and autopay retries at most once per invoice per day, and lock nightly to the daily schedule 2026-07-30 17:50:11 -04:00
johnnyq
119334ab71 Cron Fix 2026-07-30 16:44:56 -04:00
johnnyq
3c8f812a16 Feature: On all export modals added Filter Tab and Selectable Columns tab with default selected, also you can now export to a PDF 2026-07-30 00:46:15 -04:00
johnnyq
3296e48ac6 Unlink template from recurring ticket if template is deleted 2026-07-29 16:36:47 -04:00
johnnyq
75d8b4d37c Fix get FieldByID spots 2026-07-29 16:16:32 -04:00
johnnyq
566d74c15d Fix SLA resolve-time reporting, stale settings cache on save, and report N+1 2026-07-29 13:34:34 -04:00
johnnyq
162a597da9 Add SLA pausing, SLA reports, SLA filtering and kanban SLA state (phase 3)
Statuses can be flagged to pause the resolution clock; sla_history records the intervals a ticket's clock actually ran and the deadline is re-based on remaining budget when it resumes. Adds SLA Summary and SLA by Client reports, an SLA state filter on the ticket list, SLA colouring on kanban cards, and an Urgent column on the Tickets by Client report. DB update 2.5.1. Also fixes resolution SLA verdicts being skipped when resolving via kanban or the client portal.
2026-07-29 13:02:27 -04:00
johnnyq
07c73a6a04 Add Urgent Priority, move Per Client SLA Settings to notes tab in client add / edit modal remove unnessesary sla admin setting for client overide 2026-07-29 00:49:31 -04:00
johnnyq
d08ef6184a Add optional ticket SLAs
Response/resolution targets stamped at creation from per-client/priority assignments, business-hours due date math, warn/breach alert stages via cron/ticket_sla.php, ticket list coloring, per-ticket SLA override, admin page for plans/assignments/business hours. DB update 2.5.0. No behavior change unless SLAs are assigned. Bulk reply now only counts Public replies as first response.
2026-07-29 00:00:42 -04:00
johnnyq
c5ff3e2a3f Normalize line endings to LF; add .gitattributes and .editorconfig 2026-07-28 17:45:52 -04:00
johnnyq
4c65b8c561 Clear mail bodies after successful delivery 2026-07-28 00:18:07 -04:00
johnnyq
53842a50d2 Add URI Tabs to mail settings keeps the tab active upon saving 2026-07-26 01:52:25 -04:00
johnnyq
c509b7f693 Add user-based RBAC for API keys
API keys now run as a user and inherit that user's module, operation, and client permissions. Drops per-key client scoping and removes existing keys (must be recreated). Adds an edit modal to change a key's user.
2026-07-25 16:50:58 -04:00
johnnyq
3756561458 Feature: Add Deny Client Access to Client Access Permssions - BREAKS UI, MUST UPDATE DB USING php scripts/cli_update.php --db_update 2026-07-25 13:22:52 -04:00
johnnyq
8813b2c066 Use imapEngine lib for testing imap connection 2026-07-24 18:56:16 -04:00
johnnyq
5c4805b822 Neutralize CSV formula injection in generated exports using the new created escapeCsvFormula Function 2026-07-24 18:12:45 -04:00
johnnyq
28f1a965b8 Remove dead code 2026-07-24 17:33:09 -04:00
johnnyq
af51c4316f Updated validateCSRFToken to automatically grab and compare get or post csrf token no longer need to pass an argument to the function which fixed the issue if no hash was present 2026-07-24 13:40:37 -04:00
johnnyq
91a1676e89 Update missing CSRF endpoint checks 2026-07-24 13:16:51 -04:00
johnnyq
9c65644adc Update the rest of the PHP functions to use camelCase 2026-07-23 17:39:06 -04:00
johnnyq
8f43b92496 Use stripe_init include to init stripe and updated code everywhere 2026-07-23 13:00:01 -04:00
johnnyq
2b756f6ea4 Split DB Updates into seperate files, with the cutoff being 2.0.0 2026-07-22 18:43:11 -04:00
johnnyq
5402578ce6 Remove Static payment processing fees from database and update field hints with useful info when adding / editing payment provider 2026-07-22 17:32:01 -04:00
johnnyq
bcb244c245 Update skipped function renames in anything named vendor 2026-07-14 19:09:32 -04:00
johnnyq
b8873039a4 Rename Functions: flash_alert, sanitizeFilename and display_folder_options using camelCase instead to match other custom php functions 2026-07-14 17:41:41 -04:00
johnnyq
f1836c70cd Replace Function logAction() with logAudit() 2026-07-14 17:35:23 -04:00
johnnyq
b57ddc0e5c Replace Function sanitizeInput() with just escapeSql() and update all instances throughout 2026-07-14 17:17:50 -04:00
johnnyq
7bc47a58fe Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout 2026-07-14 17:10:45 -04:00
johnnyq
bf0d799caf Remove old function comment 2026-07-14 16:51:34 -04:00
johnnyq
29bea9517d Removed the last of legacy validate functions and replaced with the new enforce fumctions. 2026-07-14 16:49:14 -04:00
johnnyq
8da3a107fb Rename plugins to libs and update all file references 2026-07-10 13:24:20 -04:00
johnnyq
1a1f6d80a1 Possible Fix for OAUTH2 M365 2026-07-02 16:08:59 -04:00
johnnyq
6532c2dde4 User Preferences Avatar: Fix creating user upload directory if doesnt exist, and remove Avatar now properly deletes the old avatar image 2026-06-24 12:04:19 -04:00
johnnyq
c434b5e6f0 Categories: Fix Restore function and restore icon and color 2026-04-04 18:22:05 -04:00
johnnyq
383897ee27 Assets: Moved asset status to be creatable/editable Categories with common defaults and descriptions also Add category description to add / edit modals and description underneath category name 2026-03-30 17:25:51 -04:00
johnnyq
918b40afbe Add missing CSRF Checks in admin area and settings 2026-03-02 22:15:36 -05:00
Johnny
4d895a56e4 Merge pull request #1261 from cs2000/develop
Add full Microsoft 365 and Google OAuth mail support
2026-02-05 14:04:22 -05:00
cs2000
6a6eb4a714 SonarCube Suggestion
Define a constant "MICROSOFT_OAUTH_BASE_URL" instead of duplicating "https://login.microsoftonline.com/" multiple times in the same file.
2026-02-05 10:22:06 +00:00
johnnyq
4079257739 Update UI/UX for Adding and editing roles, Permissions can be set upon role add nice blocker style radios buttons instead of select boxes 2026-02-04 13:12:24 -05:00
cs2000
a50a4f274f Changes for M365 oAuth
- Added handler to start Microsoft OAuth Authorization Code flow (oauth_connect_microsoft_mail) with state generation/validation prep.
- Added handler to test OAuth token refresh from admin UI and persist refreshed tokens/expiry.
- Updated IMAP test handler to support OAuth token refresh + XOAUTH2 authentication (in addition to legacy LOGIN).
2026-02-04 13:23:53 +00:00
wrongecho
41df4c4b9f API Keys - Revoke then Delete 2026-01-15 11:37:17 +00:00
johnnyq
0a30300bde replace all instances of mysqli_fetch_array with mysqli_fetch_assoc for better performance and memory usage 2026-01-14 17:30:23 -05:00
johnnyq
1de023f9df Fix Role Archiving, Roles can only be archived if no users are assigned to the role 2026-01-11 16:46:53 -05:00
johnnyq
05018e5f17 Added Reset favicon 2025-12-13 15:45:02 -05:00
johnnyq
27fde82aff Fixed Adding Payment provider not adding an account, now adding you can customize the income/expense account, expense category, and Expense vendor. Moved Saved Payment Provider Methods into Payment Providers as a link instead of on the admin side nav. Same with AI Provider and AI Models. 2025-12-12 16:42:09 -05:00