From d936339f07260825b67feca9586ddf88180d45b0 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 2 Mar 2026 18:28:53 -0500 Subject: [PATCH] Contacts: Add missing CSRF checks, add missing permission checks, renamed unarchive to restore --- agent/contact_details.php | 20 ++-- agent/contacts.php | 14 +-- agent/modals/contact/contact_add.php | 2 + agent/modals/contact/contact_archive.php | 7 +- agent/modals/contact/contact_edit.php | 1 + agent/modals/contact/contact_export.php | 1 + agent/modals/contact/contact_import.php | 1 + agent/modals/contact/contact_invite.php | 3 +- agent/modals/contact/contact_link_asset.php | 2 +- .../contact/contact_link_credential.php | 1 + .../modals/contact/contact_link_document.php | 1 + agent/modals/contact/contact_link_file.php | 1 + agent/modals/contact/contact_link_service.php | 1 + .../modals/contact/contact_link_software.php | 1 + agent/modals/contact/contact_note_add.php | 3 +- agent/post/contact.php | 99 +++++++++++++++---- 16 files changed, 115 insertions(+), 43 deletions(-) diff --git a/agent/contact_details.php b/agent/contact_details.php index fa5036e2..2422e5a2 100644 --- a/agent/contact_details.php +++ b/agent/contact_details.php @@ -476,7 +476,7 @@ if (isset($_GET['contact_id'])) { Unlink @@ -616,13 +616,13 @@ if (isset($_GET['contact_id'])) { Unlink - + Delete @@ -709,7 +709,7 @@ if (isset($_GET['contact_id'])) { - + @@ -778,7 +778,7 @@ if (isset($_GET['contact_id'])) { - + Delete @@ -931,7 +931,7 @@ if (isset($_GET['contact_id'])) { - + @@ -997,7 +997,7 @@ if (isset($_GET['contact_id'])) { data-modal-url="modals/document/document_view.php?id="> - + @@ -1060,7 +1060,7 @@ if (isset($_GET['contact_id'])) { KB - + @@ -1124,12 +1124,12 @@ if (isset($_GET['contact_id'])) {
+ + + - +
@@ -44,7 +45,7 @@
- +
- \ No newline at end of file + diff --git a/agent/modals/contact/contact_edit.php b/agent/modals/contact/contact_edit.php index 18ad5e0a..b22e21b5 100644 --- a/agent/modals/contact/contact_edit.php +++ b/agent/modals/contact/contact_edit.php @@ -53,6 +53,7 @@ ob_start();
+ + + + - \ No newline at end of file + diff --git a/agent/modals/contact/contact_link_asset.php b/agent/modals/contact/contact_link_asset.php index 0443126e..52a133e0 100644 --- a/agent/modals/contact/contact_link_asset.php +++ b/agent/modals/contact/contact_link_asset.php @@ -13,7 +13,6 @@ $row = mysqli_fetch_assoc($sql); $contact_name = nullable_htmlentities($row['contact_name']); $client_id = intval($row['contact_client_id']); -// Generate the HTML form content using output buffering. ob_start(); ?> @@ -25,6 +24,7 @@ ob_start(); + + + + + +