diff --git a/CHANGELOG.md b/CHANGELOG.md index 2023e6cba..5fe672af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This file documents all notable changes made to ITFlow. ### Upgrading to 26.12 -Update from Maintenance > Update — Queue Update hands the job to cron, which updates the files and applies this release's thirty-six database changes (3.6.6 to 4.0.3) in the same pass. They add four tables for RMM providers and their alerts, a setting for API keys in the address, a column marking the emails the mail queue clears once sent, a column and a table for agent banners, two columns for ticket statuses with a setting for the "ticket assigned" message, a column on tickets with a setting for the "no response" message, a table for who a ticket's email replies go to, the settings for Quick tickets, columns on recurring tickets and recurring invoices for booking and making them ahead, two columns on ticket replies for when their time was worked, the settings for cron alerts, a table and a setting for labor costs, a column on users for API / service accounts, columns on tickets and recurring tickets for how long booked work takes, a column each on recurring tickets and calendar events for repeating on a weekday, three columns on agents' settings for their calendar color, what their calendar shows and their own time zone, a table for the agents helping on a ticket, three columns on quote lines with three settings for what a quote line costs and how it is priced, a column each on quote lines and products with a setting for their pictures, two settings and a column on tickets for keeping project tickets apart, a table for your other offices with a column each on agents and invites for which one they work from, three settings for the emails and notices your agents get about their tickets, three settings for sending and reading Microsoft 365 mail through Microsoft Graph, five tables, four settings and a role permission for purchase orders, five settings for switching Dispatch, Bookkeeping, Purchasing, Trips and the calendar on and off, and eight tables, three columns and two settings for the Knowledge Base, who can read its articles, what its readers think of them and their files, a column on documents for how often each is reviewed, a column on agents' settings for compact rows, a table for reply drafts, a table for which tickets each agent has opened, two columns on contacts for an email that bounces, and change nothing that is there. Nothing else is required, but it is a big release, so take a backup before you update. Purchasing starts off - switch it on in Admin > Settings > Modules - and so does the Knowledge Base's public help center, in Admin > Settings > Knowledge Base. This release has thirteen security fixes - see Security. On Apache, ITFlow's own .htaccess now sends security headers: if you show ITFlow inside a frame on another website, it will now refuse to load there. On nginx, add the same headers to your server block if you want them - see Developer Updates. +Update from Maintenance > Update — Queue Update hands the job to cron, which updates the files and applies this release's thirty-seven database changes (3.6.6 to 4.0.4) in the same pass. They add four tables for RMM providers and their alerts, a setting for API keys in the address, a column marking the emails the mail queue clears once sent, a column and a table for agent banners, two columns for ticket statuses with a setting for the "ticket assigned" message, a column on tickets with a setting for the "no response" message, a table for who a ticket's email replies go to, the settings for Quick tickets, columns on recurring tickets and recurring invoices for booking and making them ahead, two columns on ticket replies for when their time was worked, the settings for cron alerts, a table and a setting for labor costs, a column on users for API / service accounts, columns on tickets and recurring tickets for how long booked work takes, a column each on recurring tickets and calendar events for repeating on a weekday, three columns on agents' settings for their calendar color, what their calendar shows and their own time zone, a table for the agents helping on a ticket, three columns on quote lines with three settings for what a quote line costs and how it is priced, a column each on quote lines and products with a setting for their pictures, two settings and a column on tickets for keeping project tickets apart, a table for your other offices with a column each on agents and invites for which one they work from, three settings for the emails and notices your agents get about their tickets, three settings for sending and reading Microsoft 365 mail through Microsoft Graph, five tables, four settings and a role permission for purchase orders, five settings for switching Dispatch, Bookkeeping, Purchasing, Trips and the calendar on and off, and eight tables, three columns and two settings for the Knowledge Base, who can read its articles, what its readers think of them and their files, a column on documents for how often each is reviewed, a column on agents' settings for compact rows, a table for reply drafts, a table for which tickets each agent has opened, two columns on contacts for an email that bounces, a table for credentials' earlier passwords, and change nothing that is there. Nothing else is required, but it is a big release, so take a backup before you update. Purchasing starts off - switch it on in Admin > Settings > Modules - and so does the Knowledge Base's public help center, in Admin > Settings > Knowledge Base. This release has thirteen security fixes - see Security. On Apache, ITFlow's own .htaccess now sends security headers: if you show ITFlow inside a frame on another website, it will now refuse to load there. On nginx, add the same headers to your server block if you want them - see Developer Updates. ### Security @@ -171,6 +171,10 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Contacts: New ticket in a contact's row on the contacts list raises a ticket for them without opening them first. - Tickets and assets: the + beside Contact, Site and Vendor in New Ticket and Edit Ticket, and beside Location, Assigned to and Vendor in the asset form, adds one there and picks it - no closing the window to add it. - Clients: Merge into another client, in a client's menu, merges the same company added twice - every contact, ticket, invoice, document, file and the rest moves to the client you keep, whose own details stay, and the duplicate is left archived and empty. It says first what moves and which agents' access differs between the two. It takes Delete access to clients. +- Assets: Copy details, on an asset's page and its quick look, copies what a vendor's support case asks for as text, ready to paste - make and model, serial, OS, its details, IP and MAC, warranty, dates, the site's address and where it is racked. +- Racks: drag an item on a rack to another position, or across to the other side, and it moves there. Drag one of the client's assets from Not racked yet onto the rack and Add opens with it and where you dropped it filled in. While you drag, the rack shows where it would go, in red where something is in the way. +- Credentials: Reused password, along the top of Credentials, picks out the logins whose password another of the same client's logins also has, each marked Reused, and a credential's quick look names the others. The passwords are compared as the page opens, with your vault key, and nothing about them is kept. +- Credentials: a password that is changed is now kept as an earlier password, still encrypted. Earlier passwords in a credential's quick look shows when each was in use and who changed it, with the eye and copy buttons, and Put back makes one the password again when a change broke something. The newest ten are kept, agents with Delete access to credentials can delete one, and each one looked at is logged. - Contacts and assets: an email already on another contact - now when changing a contact too - and a serial number or MAC address already on another asset are named as they're typed, with who or which, and where. - Modules: Admin > Settings > Modules has five more switches, to take out of ITFlow what your business doesn't use - Dispatch, which comes with Ticketing; Bookkeeping, Purchasing and Trips, which come with invoicing; and the Calendar. Each part is off while the one it comes with is, and shows faded under it. Switched off, a part leaves the menus, the dashboard, search, the reports and the API, and its pages and windows say it is off. Nothing in it is deleted - switched back on, it is all there. Dispatch, Bookkeeping, Trips and the Calendar start on, as before. - Bookkeeping: switch it off when your books are kept somewhere else. Accounts, Transactions, Transfers, Reconcile and the statement imports go, and nobody picks an account: payments and income go into the default payment account, and expenses come out of the default expense account - both in Admin > Settings > Defaults, or the first account when there's no default. An expense is paid by The business or Paid personally. The dashboard leaves out the account balances, and the Tax Package its Accounts section. @@ -360,6 +364,9 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u - Clients: new `functions/client.php` - `clientOffboardCounts()`, `clientArchiveNow()` (now behind `archive_client` too) and `clientStopRecurringInvoices()`. `offboard_client` (`agent/modals/client/client_offboard.php`) runs the steps ticked with `portalUserAccessOff()`, `portalInviteCancel()`, `shareEnd()` (reason "Client offboarded"), the recurring invoices (Billing edit) and `recurring_ticket_paused_at` (Support edit), and audits one line. `js/client_card.js` (every agent page) shows `agent/ajax.php?client_card` in a Bootstrap popover on `a[data-client-card]` - added to the client-name links on the lists and record pages - and on links to `client_overview.php?client_id=`, outside the sidebar, breadcrumbs, menus and navs. - Contacts, tickets and assets: `quickAddButton()` in `functions/contact.php` and `js/quick_add.js` (every agent page) add a contact, location or vendor through `quick_add_record` in `agent/ajax.php` (Client edit; locations through `locationFormSet()`, the first made primary; vendors through `vendorFormSet()`) from a SweetAlert2 form inside the window, then add it to the picker as picked. `contact_email_check` takes `exclude` and names the contact and client it finds; new `asset_duplicate_check` (`serial`, or `mac` compared as 12 hex digits) for the asset form's `[data-asset-duplicate]` fields. - Clients: `clientMerge()` in `functions/client.php` (`merge_client`, `agent/modals/client/client_merge.php`, Client delete and access to both) moves every `*_client_id` in `clientMergeTables()` - those this database has, logs and notifications included; unions `client_tags`, `kb_article_clients` and `ticket_template_portal_clients`; keeps the kept client's row where there can be one (`sla_assignments`, `kb_search_misses`, `client_onboardings` by `UPDATE IGNORE` then delete) and one primary contact and location; moves a card provider and its saved cards only where the kept client has none for that provider, otherwise deletes the merged client's (autopay on them goes by cascade); moves `uploads/clients/`; appends the quick notes; moves `config_internal_client_id`; and renames and archives what's left. `user_client_permissions` aren't changed - `clientMergeAccessChanges()` (`client_merge_access` in `agent/ajax.php`) lists the agents whose access differs. `clientMergeSummary()` counts what moves. +- Assets: `assetDetailsText()` in `functions/asset.php` - the asset as "Label: value" lines, for the Copy details buttons (`.clipboardjs`) on `agent/asset.php` and `agent/modals/asset/asset.php`. +- Racks: `move_rack_unit` in `agent/post/rack.php` (`unit_id`, `unit_start`, `face`; height and depth kept; the rack's bounds and `rackUnitConflict()` checked; refused on an archived rack) is posted through `#rackMoveForm` by `agent/js/rack_drag.js`, loaded on `agent/rack.php` for agents who can edit. `agent/includes/rack_elevation.php` gives each bay `data-rack-drop` with its face, height and numbering, and each item `data-rack-unit`, `-start`, `-end` and `-name`, with `data-rack-drag` on the ones that move. An asset dropped opens `rack_device_add.php` with `asset_id`, `u` and `face`. `rackAssetDefaults()` in `functions/rack.php` is the height and depth an asset type starts from, for that window and the Not racked yet list. +- Credentials: database 4.0.4 adds `password_history` (the encrypted `password_history_password` as it was on the credential, `_set_at`, `_replaced_at`, `_user_id`, and `_credential_id` with an `ON DELETE CASCADE` key to `credentials`). `credentialPasswordKeep()` in `functions/credential.php` copies the current password there and keeps the newest `CREDENTIAL_PASSWORD_HISTORY_KEEP` (10); `edit_credential`, `rotate_credential`, the API's `credentials/update` and the credential import call it before a password that wasn't empty changes. `credentialPasswordHistory()`, `credentialPasswordHistoryRow()` and `credentialPasswordHistoryReady()`. `get_credential_via_id` takes `history_id`, logged once in 5 minutes as a View; `credentialPasswordHtml()` takes the history id as `data-credential-history`, which `js/credentials.js` sends. `restore_credential_password` (Credential edit) and `delete_credential_password_history` (Credential delete) in `agent/post/credential.php`. `credentialReusedPasswords($where)` decrypts the passwords in `$where` and groups them by client and SHA-256 in memory; `credentialReusedPill()`, and the `reused` pill on `agent/credentials.php`. ## [26.11.8] diff --git a/admin/database_updates/4.0.4.php b/admin/database_updates/4.0.4.php new file mode 100644 index 000000000..df6ebaea9 --- /dev/null +++ b/admin/database_updates/4.0.4.php @@ -0,0 +1,27 @@ + 'That earlier password is no longer kept.']); + exit; + } + echo json_encode(['password' => decryptCredentialEntry($history['password_history_password'])]); + $what = "$session_name viewed an earlier password of credential $name"; + $recent = mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(log_id) FROM logs WHERE log_type = 'Credential' AND log_action = 'View' AND log_user_id = $session_user_id AND log_entity_id = $credential_id + AND log_description = '" . escapeSql($what) . "' AND log_created_at > (NOW() - INTERVAL 5 MINUTE)")); + if (!intval($recent[0])) { + logAudit("Credential", "View", $what, $client_id, $credential_id); + } + exit; + } + $response = array( 'username' => decryptCredentialEntry($sql['credential_username']), 'password' => decryptCredentialEntry($sql['credential_password']) diff --git a/agent/asset.php b/agent/asset.php index 2251cad40..ccf711900 100644 --- a/agent/asset.php +++ b/agent/asset.php @@ -324,6 +324,9 @@ if (mysqli_num_rows($sql) == 0) { +