escape shell arg

This commit is contained in:
leah 2021-08-20 16:55:11 +01:00
parent b4b9950a83
commit 6c83bc5a2e
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ $command = $_GET["command"];
echo $command;
$output=null;
$retval=null;
exec('man --html=cat ' . $command , $output, $retval);
exec('man --html=cat '.escapeshellarg($command) , $output, $retval);
echo "Returned with status $retval and output:\n";
foreach ($output as $line): ?>
<?=$line?>