diff --git a/lib/terminal-xhr.php b/lib/terminal-xhr.php index 6516057..df232fe 100644 --- a/lib/terminal-xhr.php +++ b/lib/terminal-xhr.php @@ -21,6 +21,13 @@ if(!empty($_REQUEST['command'])) { $output = "".$cwd."\n$> ".$_REQUEST['command']."\n\n"; } +// If in demo mode, display message and go no further +if ($demoMode) { + $output .= "Sorry, shell usage not enabled in demo mode\n\n"; + echo $output; + exit; +} + // If command contains cd but no dir if (preg_match('/^[[:blank:]]*cd[[:blank:]]*$/', @$_REQUEST['command'])) { $_SESSION['cwd'] = getcwd(); //dirname(__FILE__);