From 361c4806a354c11454cf28db1a214f2672d3225d Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 17 Dec 2024 07:27:26 +0100 Subject: [PATCH] security/tinc: remove sessionClose() --- .../OPNsense/Tinc/Api/ServiceController.php | 50 ++++++++----------- .../OPNsense/Tinc/Api/SettingsController.php | 44 ++++++++-------- 2 files changed, 40 insertions(+), 54 deletions(-) diff --git a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/ServiceController.php b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/ServiceController.php index caa033177..fe8c8f724 100644 --- a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/ServiceController.php +++ b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/ServiceController.php @@ -1,31 +1,29 @@ request->isPost()) { - // close session for long running action - $this->sessionClose(); $backend = new Backend(); $backend->configdRun('template reload OPNsense/Tinc'); return array("status" => "ok"); @@ -62,8 +58,6 @@ class ServiceController extends ApiControllerBase public function startAction() { if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); $backend = new Backend(); $response = $backend->configdRun("tinc start"); return array("response" => $response); @@ -79,8 +73,6 @@ class ServiceController extends ApiControllerBase public function stopAction() { if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); $backend = new Backend(); $response = $backend->configdRun("tinc stop"); return array("response" => $response); @@ -96,8 +88,6 @@ class ServiceController extends ApiControllerBase public function restartAction() { if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); $backend = new Backend(); $response = $backend->configdRun("tinc restart"); return array("response" => $response); diff --git a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/SettingsController.php b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/SettingsController.php index 4bbbe0395..c8c7497b0 100644 --- a/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/SettingsController.php +++ b/security/tinc/src/opnsense/mvc/app/controllers/OPNsense/Tinc/Api/SettingsController.php @@ -1,31 +1,29 @@ sessionClose(); $grid = new UIModelGrid($this->getModel()->networks->network); return $grid->fetchBindRequest( $this->request, @@ -197,7 +194,6 @@ class SettingsController extends ApiMutableModelControllerBase */ public function searchHostAction() { - $this->sessionClose(); $grid = new UIModelGrid($this->getModel()->hosts->host); return $grid->fetchBindRequest( $this->request,