Commit Graph

255 Commits

Author SHA1 Message Date
johnnyq
a27019511e Remove unused overdue invoice setting move master cron switch out of notificaiton and into cron 2026-08-02 17:22:28 -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
16000efcf7 Drop SVG extension in the ticket mail parser 2026-07-31 12:39:10 -04:00
johnnyq
7c5579677d Cron: daily jobs catch up when the dispatcher is invoked before their scheduled time, so an old single daily crontab entry still runs them 2026-07-30 18:21:47 -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
0631c45040 Fix Cron Schedule and new directory includes created inside cron for the cron lock 2026-07-30 17:06:07 -04:00
johnnyq
119334ab71 Cron Fix 2026-07-30 16:44:56 -04:00
johnnyq
38e8edea19 Cron runs all jobs from a single dispatcher cron.php which should now be run every minute and all other cron jobs eliminated from cron 2026-07-30 13:48:39 -04:00
johnnyq
b3f959ac55 Use Short echo tags across the code 2026-07-28 18:47:52 -04:00
johnnyq
c64c76c577 Rotate session ID on login and fix client portal Entra SSO 2026-07-27 23:49:09 -04:00
johnnyq
a844d7b428 Adds a shared flock guard used by all five cron entry points, keyed per
script and per install. Replaces the mail queue's own lock file, which
was not atomic and could be deleted out from under a long run. Bounds
the SMTP conversation so an unresponsive server cannot hold the lock.
Recovers rows left at Sending by a run that died, which nothing
previously picked up.
2026-07-27 17:35:39 -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
565aff35f6 Set SameSite=Lax on the session cookie
Applied at all seven session_start sites. keepalive.php and guest_post.php
had no cookie flags at all and now set httponly and secure too.
2026-07-24 14:09:52 -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
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
8da3a107fb Rename plugins to libs and update all file references 2026-07-10 13:24:20 -04:00
johnnyq
aab8b34970 Bump ITFlow Version and changelog 2026-07-03 12:15:05 -04:00
johnnyq
fab5dbea04 Don't set Theme to Gray amd blue when in client section always Keep configured theme 2026-06-29 18:52:56 -04:00
johnnyq
1bcc535e99 Updated Changelog and Bump ITFlow version and update logs timestamp fields to use monospace font 2026-06-27 21:52:02 -04:00
johnnyq
a02d78bde5 Bump Version 2026-05-21 10:38:56 -04:00
johnnyq
351e81231f Update Changelog Bump Release 2026-05-04 16:50:18 -04:00
johnnyq
b79a6c390e Move some arrays out of load global settings and into their own entity 2026-04-05 12:00:56 -04:00
johnnyq
fae74a8b1e Software: Add Additional License Types 2026-04-05 11:48:07 -04:00
johnnyq
8a4bb2e80d Update App version 2026-04-04 17:51:14 -04:00
johnnyq
02d217402c Categories: Moved note type, software type, rack type to be creatable/editable Categories with common defaults and descriptions 2026-03-31 18:05:16 -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
d8359e1049 Network Interface Types: Moved to creatable/editable Categories with common defaults 2026-03-30 15:24:09 -04:00
johnnyq
7acaf55331 Bump App Version and Update Changelog 2026-03-08 12:47:02 -04:00
johnnyq
7f180eb6d9 Migrate Invoice Quote Recurring Invoice Items to their new respecting tables 2026-03-07 18:47:28 -05:00
johnnyq
72091670fd Bump DB to to include tables for quote items and recurring invoice item for future splitting of line items 2026-03-07 18:23:19 -05:00
johnnyq
129e95fd3a Added Net 45 Days, removed 14 Days as this isnt typically used anywhere 2026-02-19 12:34:30 -05:00
johnnyq
2349ef33d1 Remove 0 in access_permission_query 2026-02-14 15:07:42 -05:00
johnnyq
ccaf15268c Add a 0 IN ticket_client_id for no client tickets so agents that are restricted to certain clients and still view no clients in tickets list by using a , also restrict change clients on tickets for restricted agents 2026-02-14 15:06:17 -05:00
johnnyq
3014bba66d Update Changelog, Bump App Release 2026-02-14 12:01:49 -05:00
johnnyq
ec7f1d561d Fix Version 2026-02-06 13:12:34 -05:00
johnnyq
1c6795dd55 Bump app version 2026-02-06 12:09:32 -05:00
johnnyq
65d1f59e9b Feature: Favorites added to assets, Bulk Fav/unfav, adds favs to client overview 2026-02-03 22:23:20 -05:00
johnnyq
118cc10804 During load user session check if user is archived and active, prevents users from making further actions if they are disabled or archived but are still logged in 2026-01-30 13:36:18 -05:00
johnnyq
bf1d0655c4 Update Ticket list ui smaller badge for ticket and smaller task progress bar and more natural dates 2026-01-28 22:52:56 -05: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
wrongecho
77e4d2b566 Add task approval system 2026-01-09 17:14:44 +00:00
johnnyq
72ef918452 Update changelog and bump app version to 25.12.1 2025-12-12 16:51:34 -05:00
johnnyq
0e4cc76a84 Bump Version for 25.12 updated changelog 2025-12-06 12:18:11 -05:00
johnnyq
47e647c712 Update Changelog and bunp App Version 2025-11-16 17:55:13 -05:00
johnnyq
abb97ad99f [Feature] Added Asset Tags 2025-11-11 19:57:51 -05:00
johnnyq
65d2b8b2cb UJpdate App Version and Changelog for release 2025-11-08 12:44:58 -05:00