From 4663727b470ae4999b122233586f80475587d75e Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Sun, 4 Feb 2018 10:05:20 +0100 Subject: [PATCH] add sessionClose to search and get actions in the Tor controllers --- .../mvc/app/controllers/OPNsense/Tor/Api/ExitaclController.php | 2 ++ .../mvc/app/controllers/OPNsense/Tor/Api/GeneralController.php | 2 ++ .../controllers/OPNsense/Tor/Api/HiddenserviceController.php | 2 ++ .../controllers/OPNsense/Tor/Api/HiddenserviceaclController.php | 2 ++ .../mvc/app/controllers/OPNsense/Tor/Api/SocksaclController.php | 2 ++ 5 files changed, 10 insertions(+) diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/ExitaclController.php b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/ExitaclController.php index f6295d60e..d0409e6eb 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/ExitaclController.php +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/ExitaclController.php @@ -39,10 +39,12 @@ class ExitaclController extends ApiMutableModelControllerBase static protected $internalModelClass = '\OPNsense\Tor\ACLExitPolicy'; public function searchaclAction() { + $this->sessionClose(); return $this->searchBase('policy', array('enabled', 'type', 'network', 'action', 'startport', 'endport')); } public function getaclAction($uuid = null) { + $this->sessionClose(); return $this->getBase('exitpolicy', 'policy', $uuid); } public function addaclAction() diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/GeneralController.php b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/GeneralController.php index 570cd6286..d4487ebf3 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/GeneralController.php +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/GeneralController.php @@ -77,11 +77,13 @@ class GeneralController extends ApiMutableModelControllerBase public function searchhidservauthAction() { + $this->sessionClose(); return $this->searchBase('client_authentications.client_auth', array('enabled', 'onion_service', 'auth_cookie')); } public function gethidservauthAction($uuid = null) { + $this->sessionClose(); return $this->getBase('client_auth', 'client_authentications.client_auth', $uuid); } diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceController.php b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceController.php index 018c4b1b5..3b68a2b32 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceController.php +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceController.php @@ -36,10 +36,12 @@ class HiddenserviceController extends ApiMutableModelControllerBase static protected $internalModelClass = '\OPNsense\Tor\HiddenService'; public function searchserviceAction() { + $this->sessionClose(); return $this->searchBase('service', array('enabled', 'name')); } public function getserviceAction($uuid = null) { + $this->sessionClose(); return $this->getBase('hiddenservice', 'service', $uuid); } public function addserviceAction() diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceaclController.php b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceaclController.php index 7d8329e30..1f73308c3 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceaclController.php +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/HiddenserviceaclController.php @@ -36,10 +36,12 @@ class HiddenserviceaclController extends ApiMutableModelControllerBase static protected $internalModelClass = '\OPNsense\Tor\HiddenServiceACL'; public function searchaclAction() { + $this->sessionClose(); return $this->searchBase('hiddenserviceacl', array('enabled', 'hiddenservice', 'port', 'target_host', 'target_port')); } public function getaclAction($uuid = null) { + $this->sessionClose(); return $this->getBase('hiddenserviceacl', 'hiddenserviceacl', $uuid); } public function addaclAction() diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/SocksaclController.php b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/SocksaclController.php index 1617ca5fc..22add3924 100644 --- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/SocksaclController.php +++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/Api/SocksaclController.php @@ -36,10 +36,12 @@ class SocksaclController extends ApiMutableModelControllerBase static protected $internalModelClass = '\OPNsense\Tor\ACLSocksPolicy'; public function searchaclAction() { + $this->sessionClose(); return $this->searchBase('policy', array('enabled', 'type', 'network', 'action')); } public function getaclAction($uuid = null) { + $this->sessionClose(); return $this->getBase('policy', 'policy', $uuid); } public function addaclAction()