Commit Graph

6979 Commits

Author SHA1 Message Date
johnnyq
d01024931b Retire v1 Ticket and merge into 1 add ticket 2026-07-29 17:24:55 -04:00
johnnyq
8a092852cf Fixed Asset section in recurring ticket if global added project in add ticket 2026-07-29 16:52:47 -04:00
johnnyq
3296e48ac6 Unlink template from recurring ticket if template is deleted 2026-07-29 16:36:47 -04:00
johnnyq
eaf3f5abd1 Add Badge next to recurring tickets with a template 2026-07-29 16:28:17 -04:00
johnnyq
75d8b4d37c Fix get FieldByID spots 2026-07-29 16:16:32 -04:00
johnnyq
7245ff0650 Fix Cron URL Key on recurring tickets 2026-07-29 16:11:36 -04:00
johnnyq
bc64c9e3d1 Feature: Abiliry to assign Ticket Templates to Recurring Tickets 2026-07-29 15:55:14 -04:00
johnnyq
9c123c42d1 Update Changelog 2026-07-29 14:34:59 -04:00
johnnyq
af9990ff13 Fix Contact Notes and Fix a few broken links 2026-07-29 14:22:18 -04:00
johnnyq
a900b2cd74 Update DB Structure 2026-07-29 14:15:15 -04:00
johnnyq
fc5cdeea82 Add UI Elements for Asset Notes similar to contact notes 2026-07-29 14:13:55 -04:00
johnnyq
bb1f0d5489 SLA Fixes 2026-07-29 13:50:00 -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
750c2e58cc Update DB Structure 2026-07-29 13:23:02 -04:00
johnnyq
9533da4053 Repair SLA verdicts missed by kanban/portal resolve; record first response on kanban resolve 2026-07-29 13:21:37 -04:00
johnnyq
cc651c18be DB Structure Update 2026-07-29 13:04:05 -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
e76b384606 Add ticket reply API endpoints
GET /api/v1/ticket_replies/read.php and POST create.php, so an RMM or
monitoring system can append to a ticket it did not open.

Replies default to Internal so an integration cannot email a client by
omitting a parameter. Public replies mark first response, notify the
contact and watchers, and fire the same custom actions as the agent
reply handler. An optional ticket_status also sets the status, and
resolves the ticket and marks the resolution SLA when set to 4.

Replies are always joined to tickets so ticket_client_id is checked
against the key user's client scope, and the client_id named on a write
must match the ticket's own client. The reply is attributed to the user
the API key runs as.

read.php resolves ticket_reply_by_name, since that column holds a
user_id on Internal and Public replies but a contact_id on Client ones.
2026-07-29 01:53:18 -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
d5ed05017b Allow selecting client SLA assignments on client create/edit 2026-07-29 00:21:13 -04:00
johnnyq
dd45a0f4f1 Update DB Structure 2026-07-29 00:03:08 -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
78ee38b39f Revert DB Update 2026-07-28 22:08:01 -04:00
johnnyq
1494d2cb5e Backed out of Refunds which still keeps the fix to properly set the invoice status when payment is deleted 2026-07-28 22:03:35 -04:00
johnnyq
31921ee99b Add Refunding capability along with Stripe Refunding 2026-07-28 21:34:06 -04:00
johnnyq
b3f959ac55 Use Short echo tags across the code 2026-07-28 18:47:52 -04:00
johnnyq
0031438bce Update Contrubuting 2026-07-28 18:12:42 -04:00
johnnyq
556ab22c79 Enfoce Sales Permission Read on products export 2026-07-28 17:53:13 -04:00
johnnyq
78e7e1c49e Remove Normalize Scripts 2026-07-28 17:46:39 -04:00
johnnyq
c5ff3e2a3f Normalize line endings to LF; add .gitattributes and .editorconfig 2026-07-28 17:45:52 -04:00
johnnyq
7f7880a4a7 Add Quick Payments view modal in Invoices 2026-07-28 12:49:57 -04:00
johnnyq
5f3a0bec46 Remove old payments and revenues and all ties to the pages as these are combined in income now 2026-07-28 12:38:29 -04:00
johnnyq
c3896ba3d6 Add Export CSV to the new combined income page 2026-07-28 12:26:50 -04:00
johnnyq
7327ebb37c Stop parallel login attempts from bypassing the rate limits 2026-07-28 01:01:43 -04:00
johnnyq
2e855f62c9 Require credential module access to view or share credentials 2026-07-28 00:40:33 -04:00
johnnyq
4c65b8c561 Clear mail bodies after successful delivery 2026-07-28 00:18:07 -04:00
johnnyq
c64c76c577 Rotate session ID on login and fix client portal Entra SSO 2026-07-27 23:49:09 -04:00
johnnyq
22e93589cb Fix share link view accounting and quote response handling 2026-07-27 21:11:45 -04:00
johnnyq
f129311b2e Remove patch and update gitignore 2026-07-27 21:02:13 -04:00
johnnyq
70d165e8bc Claim shared item views atomically and log guest audit IPs 2026-07-27 20:58:37 -04:00
johnnyq
b555a300bc Give the vault session key full entropy and guard empty-key credential writes
generateUserSessionKey() built its AES-128 key with randomString(16), which
draws 12 random bytes and base64url-encodes them into 16 printable characters.
Those 16 characters were handed to openssl_encrypt as the 16-byte key, so the
key that wraps the site master key in the user's session carried 96 bits of
entropy instead of 128. Same for the IV.

The key and IV are now random_bytes(16) and stay raw for the cipher. Base64 is
applied only for transport - the cookie and the session copy of the IV - and
decoded again at the three read sites.

Sessions issued before this change will not decode and are not supported;
anyone logged in at deploy time is prompted to log in again. Nothing is stored
long term in this path, so there is nothing to migrate.

Also guards encryptCredentialEntry against a master key that failed to decrypt.
openssl_encrypt accepts false as a key and silently encrypts under an empty
key, so a session whose cookie had expired could write a credential that no
key would ever recover. It now returns false instead. This was reachable
before this change too, whenever a cookie expired mid-session.
2026-07-27 20:27:23 -04:00
johnnyq
829527244e Fix broken ajax 2026-07-27 20:25:48 -04:00
johnnyq
50352fb779 Revert vault session key entropy change 2026-07-27 20:13:46 -04:00
johnnyq
8dcb45fc9d Remove Patch 2026-07-27 20:00:42 -04:00
johnnyq
b18544c69b Give the vault session key full entropy and guard empty-key credential writes
generateUserSessionKey() built its AES-128 key with randomString(16), which
draws 12 random bytes and base64url-encodes them into 16 printable characters.
Those 16 characters were handed to openssl_encrypt as the 16-byte key, so the
key that wraps the site master key in the user's session carried 96 bits of
entropy instead of 128. Same for the IV.

The key and IV are now random_bytes(16) and stay raw for the cipher. Base64 is
applied only for transport - the cookie and the session copy of the IV - and
decoded again at the three read sites.

Sessions issued before this change will not decode and are not supported;
anyone logged in at deploy time is prompted to log in again. Nothing is stored
long term in this path, so there is nothing to migrate.

Also guards encryptCredentialEntry against a master key that failed to decrypt.
openssl_encrypt accepts false as a key and silently encrypts under an empty
key, so a session whose cookie had expired could write a credential that no
key would ever recover. It now returns false instead. This was reachable
before this change too, whenever a cookie expired mid-session.
2026-07-27 20:00:09 -04:00
johnnyq
8825661360 Dump new DB Structure 2026-07-27 18:38:48 -04:00
johnnyq
a4fdced10f Rate limit 2FA code attempts and narrow the TOTP acceptance window 2026-07-27 18:36:43 -04:00
johnnyq
97490bef3b Security Fix in recurring invoices in cron 2026-07-27 18:07:15 -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
686fca99e1 Fix Possible duplicate emails in a race condition in mail queue 2026-07-27 16:59:10 -04:00