Sanitize post data w/ escapeshellcmd()

This commit is contained in:
billz
2023-02-17 19:05:36 +01:00
parent d19249757e
commit 1fabc48169
3 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['logfile'])) {
$logfile = $_POST['logfile'];
$logfile = escapeshellcmd($_POST['logfile']);
// truncate requested log file
exec("sudo truncate -s 0 $logfile", $return);