mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
Services: Monit: Status - sanitize monit output before offering it.
This commit is contained in:
parent
6207b5c83d
commit
0bb5afb3ae
1 changed files with 2 additions and 1 deletions
|
|
@ -72,6 +72,7 @@ class StatusController extends ApiControllerBase
|
|||
$result['status'] = curl_error($ch);
|
||||
return $result;
|
||||
}
|
||||
|
||||
$HTTPCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($HTTPCode != 200) {
|
||||
|
|
@ -83,7 +84,7 @@ class StatusController extends ApiControllerBase
|
|||
if ($format == 'xml') {
|
||||
$result['status'] = simplexml_load_string($response);
|
||||
} elseif ($format === 'text') {
|
||||
$result['status'] = '<div class="alert"><pre>' . $this->bashColorToCSS($response) . '</pre></div>';
|
||||
$result['status'] = '<div class="alert"><pre>' . $this->bashColorToCSS(strip_tags($response)) . '</pre></div>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue