mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-10 10:36:47 +01:00
Disable terminal usage in demo mode
This commit is contained in:
@@ -21,6 +21,13 @@ if(!empty($_REQUEST['command'])) {
|
||||
$output = "<span style=\"color: #fff\">".$cwd."\n$> ".$_REQUEST['command']."</span>\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__);
|
||||
|
||||
Reference in New Issue
Block a user