System:Logging - Sanitize user input. An alfanum filter might be possible as well to strip module and scope, but might break some external plugins not on our radar.

This commit is contained in:
Ad Schellevis 2023-06-29 21:46:58 +02:00
parent 5edff49db1
commit d1f350ce70

View File

@ -38,8 +38,8 @@ class LogController extends IndexController
public function renderPage($module, $scope)
{
$this->view->pick('OPNsense/Diagnostics/log');
$this->view->module = $module;
$this->view->scope = $scope;
$this->view->module = htmlspecialchars($module, ENT_QUOTES | ENT_HTML401);
$this->view->scope = htmlspecialchars($scope, ENT_QUOTES | ENT_HTML401);
$this->view->service = '';
$this->view->default_log_severity = 'Warning';