Skip to content

Commit d3a7c6f

Browse files
committed
Merge pull request hestiacp#545 from SysVoid/patch-8
Fix Undefined Var & Require $_POST['cmd'].
2 parents 1acfa60 + e9c35aa commit d3a7c6f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

web/api/index.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@
3232
exit;
3333
}
3434

35+
// Define the command to use
36+
if (isset($_POST['cmd']))
37+
{
38+
$cmd = escapeshellarg($_POST['cmd']);
39+
} else
40+
{
41+
// If there's no command, just exit.
42+
echo 'No command specified.';
43+
exit;
44+
}
45+
3546
// Prepare for iteration
3647
$args = [];
3748
$i = 0;

0 commit comments

Comments
 (0)