From eb2e4678eb5a10f6ca6a86e475d1ef9c6cd5d4e7 Mon Sep 17 00:00:00 2001 From: Meteo Date: Wed, 7 Jan 2026 23:16:36 +0100 Subject: [PATCH] Fixed an issue that allowed some disabled module content to be visible or accessible. --- .../v1/customers/companies/activate/index.php | 5 ++ pub/api/v1/office/stompjes/index.php | 5 ++ pub/api/v1/servers/index.php | 5 ++ pub/bin/pages/customers/pageCompanies.php | 6 ++ .../customers/pageCompanies_company_view.php | 5 ++ .../pages/customers/pageCompanies_view.php | 21 ++++-- pub/bin/pages/office/pageStompjes.php | 6 ++ pub/bin/pages/servers/pageServerOverview.php | 6 ++ .../pageServerOverview_server_view.php | 70 +++++++++++-------- .../pages/servers/pageServerOverview_view.php | 5 ++ 10 files changed, 97 insertions(+), 37 deletions(-) diff --git a/pub/api/v1/customers/companies/activate/index.php b/pub/api/v1/customers/companies/activate/index.php index bb9c174..6a12bf2 100644 --- a/pub/api/v1/customers/companies/activate/index.php +++ b/pub/api/v1/customers/companies/activate/index.php @@ -2,6 +2,11 @@ use api\classes\API_companies; +if (!$GLOBALS['modules_enabled']['customers']) { + echo '405 Not Allowed'; + exit; +} + session_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_companies.php'; diff --git a/pub/api/v1/office/stompjes/index.php b/pub/api/v1/office/stompjes/index.php index 15cc408..1acf4ec 100644 --- a/pub/api/v1/office/stompjes/index.php +++ b/pub/api/v1/office/stompjes/index.php @@ -2,6 +2,11 @@ use api\classes\API_office_stompjes; +if (!$GLOBALS['modules_enabled']['office']) { + echo '405 Not Allowed'; + exit; +} + session_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_office_stompjes.php'; diff --git a/pub/api/v1/servers/index.php b/pub/api/v1/servers/index.php index d83522e..842d680 100644 --- a/pub/api/v1/servers/index.php +++ b/pub/api/v1/servers/index.php @@ -2,6 +2,11 @@ use api\classes\API_servers; +if (!$GLOBALS['modules_enabled']['servers']) { + echo '405 Not Allowed'; + exit; +} + session_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_servers.php'; diff --git a/pub/bin/pages/customers/pageCompanies.php b/pub/bin/pages/customers/pageCompanies.php index cf18d02..9598d01 100644 --- a/pub/bin/pages/customers/pageCompanies.php +++ b/pub/bin/pages/customers/pageCompanies.php @@ -2,6 +2,12 @@ if (!defined('APP_INIT')) { exit; } + +if (!$GLOBALS['modules_enabled']['customers']) { + echo '405 Not Allowed'; + exit; +} + if (isset($_GET['view'])) { include_once($_SERVER['DOCUMENT_ROOT'] . '/bin/pages/customers/pageCompanies_company_view.php'); } else { diff --git a/pub/bin/pages/customers/pageCompanies_company_view.php b/pub/bin/pages/customers/pageCompanies_company_view.php index a0eeead..ac5398e 100644 --- a/pub/bin/pages/customers/pageCompanies_company_view.php +++ b/pub/bin/pages/customers/pageCompanies_company_view.php @@ -2,6 +2,11 @@ if (!defined('APP_INIT')) { exit; } + +if (!$GLOBALS['modules_enabled']['customers']) { + echo '405 Not Allowed'; + exit; +} # IDE Section # Includes Section diff --git a/pub/bin/pages/customers/pageCompanies_view.php b/pub/bin/pages/customers/pageCompanies_view.php index 64f64ff..da6014c 100644 --- a/pub/bin/pages/customers/pageCompanies_view.php +++ b/pub/bin/pages/customers/pageCompanies_view.php @@ -3,6 +3,10 @@ if (!defined('APP_INIT')) { exit; } +if (!$GLOBALS['modules_enabled']['customers']) { + echo '405 Not Allowed'; + exit; +} # IDE Section # Includes Section @@ -26,8 +30,8 @@ $jsScriptLoadData['datatables'] = true; $jsScriptLoadData['multiFilterSelect'] = true; $jsScriptLoadData['datepicker'] = true; $jsScriptLoadData['activateCompany'] = true; -# PageClasses Setup +# PageClasses Setup # Retrieve Information for the page if (!isset($_GET['all'])) { @@ -66,9 +70,8 @@ while ($row = $stmt->fetch_assoc()) {   -   -
+