Merge pull request #569 from deftx/master

Escape shell arg to remove potential malicious injection
This commit is contained in:
tom mortensen
2020-01-06 17:29:22 -08:00
committed by GitHub

View File

@@ -15,7 +15,7 @@
* auto_prepend_file="/usr/local/emhttp/webGui/include/local_prepend.php"
*/
function csrf_terminate($reason) {
shell_exec("logger error: {$_SERVER['REQUEST_URI']}: $reason csrf_token");
shell_exec("logger error: " . escapeshellarg($_SERVER['REQUEST_URI']) . ": $reason csrf_token");
exit;
}
putenv('PATH=.:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin');