Skip to content

Commit

Permalink
Sandbox Disabled - Fixes #386 #361 #332
Browse files Browse the repository at this point in the history
In general this seems to be causing more problems than it has solved, in the future I will attempt a more secure sandbox
  • Loading branch information
Konloch committed Feb 13, 2022
1 parent 4771a74 commit ab169af
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@

public class SecurityMan extends SecurityManager
{
private static final boolean disableExecSandbox = true;
private static final boolean disableDiskWriteSandbox = true;

private final AtomicInteger silentExec = new AtomicInteger(1);
private boolean printing = false;
private boolean printingPackage = false;
Expand Down Expand Up @@ -76,6 +79,10 @@ public void setPrintingPackage(boolean printingPackage)
@Override
public void checkExec(String cmd)
{
//This was disabled on 02-13-2022, at some point in the future I will fix the compatibility issues and re-enable it.
if(disableExecSandbox)
return;

//incoming command must contain the following or it will be automatically denied
String[] execWhitelist =
{
Expand Down Expand Up @@ -316,6 +323,10 @@ public void checkWrite(FileDescriptor fd) {
public void checkWrite(String file) {
if(printing)
System.out.println("Writing: " + file);

//This was disabled on 02-13-2022, at some point in the future I will fix the compatibility issues and re-enable it.
if(disableDiskWriteSandbox)
return;

try
{
Expand Down

0 comments on commit ab169af

Please sign in to comment.