Improve sanitizing php_path in tools.php

This commit is contained in:
FreeScout
2025-05-14 11:44:36 -07:00
parent 311319199e
commit fb33d672a2

View File

@@ -89,7 +89,7 @@ if (!empty($_POST)) {
if (!empty($_POST['php_path'])) {
$php_path = trim($_POST['php_path']);
$php_path = preg_replace("#[ ;\$<>:&\|]#", '', $php_path);
$php_path = preg_replace("#[ ;\$<>:&\|`\t\r\n]#", '', $php_path);
if (!$php_path) {
$php_path = 'php';
}