Fix Undefined Var & Require $_POST['cmd'].

I fixed an undefined variable in my past commit, and also enabled the requirement for the `cmd` POST field.
This commit is contained in:
System Void 2015-12-14 16:35:39 +00:00
commit e9c35aacaf

View file

@ -32,6 +32,17 @@ if (isset($_POST['user']) || isset($_POST['hash'])) {
exit;
}
// Define the command to use
if (isset($_POST['cmd']))
{
$cmd = escapeshellarg($_POST['cmd']);
} else
{
// If there's no command, just exit.
echo 'No command specified.';
exit;
}
// Prepare for iteration
$args = [];
$i = 0;