fix: prevent corrupt case model in state.php (#874)

fix: prevent corruprt case model in state.php
This commit is contained in:
Zack Spear
2024-05-02 14:00:29 -07:00
committed by GitHub
parent 31a5413643
commit f8b143904b

View File

@@ -93,7 +93,7 @@ class ServerState
$this->osVersionBranch = trim(@exec('plugin category /var/log/plugins/unRAIDServer.plg') ?? 'stable');
$caseModelFile = '/boot/config/plugins/dynamix/case-model.cfg';
$this->caseModel = file_exists($caseModelFile) ? file_get_contents($caseModelFile) : '';
$this->caseModel = file_exists($caseModelFile) ? htmlspecialchars(@file_get_contents($caseModelFile), ENT_HTML5, 'UTF-8') : '';
$this->rebootDetails = new RebootDetails();