From 90171064a8a5ea29b2d969e3e5e53b696d61aff2 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 2 Mar 2026 20:49:35 -0500 Subject: [PATCH] document and files and folders: Add missing CSRF checks, add missing permission checks --- agent/document_details.php | 18 ++++---- agent/files.php | 16 +++---- agent/modals/document/document_add.php | 1 + .../document/document_add_file_relation.php | 1 + .../document/document_add_from_template.php | 1 + agent/modals/document/document_edit.php | 1 + .../document/document_edit_visibility.php | 1 + agent/modals/document/document_link_asset.php | 1 + .../modals/document/document_link_contact.php | 1 + agent/modals/document/document_link_file.php | 1 + .../document/document_link_software.php | 1 + .../modals/document/document_link_vendor.php | 1 + agent/modals/document/document_move.php | 1 + agent/modals/document/document_rename.php | 1 + agent/modals/file/file_link_asset.php | 1 + agent/modals/file/file_move.php | 1 + agent/modals/file/file_rename.php | 1 + agent/modals/file/file_upload.php | 1 + agent/post/category.php | 2 + agent/post/document.php | 44 +++++++++++++++++++ agent/post/file.php | 18 +++++++- agent/post/folder.php | 6 +++ 22 files changed, 101 insertions(+), 19 deletions(-) diff --git a/agent/document_details.php b/agent/document_details.php index 9556ed54..169480f2 100644 --- a/agent/document_details.php +++ b/agent/document_details.php @@ -192,10 +192,10 @@ $page_title = $row['document_name']; onclick="populateShareModal()"> - + - - + +
@@ -226,7 +226,7 @@ $page_title = $row['document_name']; ?> @@ -261,7 +261,7 @@ $page_title = $row['document_name']; data-modal-size="lg" data-modal-url="modals/contact/contact_details.php?id="> - +
@@ -296,7 +296,7 @@ $page_title = $row['document_name']; data-modal-url="modals/asset/asset_details.php?id="> - + @@ -328,7 +328,7 @@ $page_title = $row['document_name']; ?>
- +
@@ -362,7 +362,7 @@ $page_title = $row['document_name']; - + @@ -415,7 +415,7 @@ $page_title = $row['document_name']; data-modal-url="modals/document/document_version_view.php?id="> - + diff --git a/agent/files.php b/agent/files.php index 1d426f59..b1d42f77 100644 --- a/agent/files.php +++ b/agent/files.php @@ -189,7 +189,7 @@ function display_folders($parent_folder_id, $client_id, $indent = 0, $render_roo - + Delete @@ -641,7 +641,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) - + Restore @@ -652,7 +652,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) - + Archive @@ -809,7 +809,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) - + Restore @@ -820,7 +820,7 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) - + Archive @@ -928,18 +928,18 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num']) - + Restore - + Delete - + Archive diff --git a/agent/modals/document/document_add.php b/agent/modals/document/document_add.php index c3e364bc..4573181e 100644 --- a/agent/modals/document/document_add.php +++ b/agent/modals/document/document_add.php @@ -17,6 +17,7 @@ ob_start();
+ diff --git a/agent/modals/document/document_add_file_relation.php b/agent/modals/document/document_add_file_relation.php index 32816119..ee7276a8 100644 --- a/agent/modals/document/document_add_file_relation.php +++ b/agent/modals/document/document_add_file_relation.php @@ -8,6 +8,7 @@ + + + +