Skip to content

Commit ab169af

Browse files
committed
Sandbox Disabled - Fixes #386 #361 #332
In general this seems to be causing more problems than it has solved, in the future I will attempt a more secure sandbox
1 parent 4771a74 commit ab169af

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545

4646
public class SecurityMan extends SecurityManager
4747
{
48+
private static final boolean disableExecSandbox = true;
49+
private static final boolean disableDiskWriteSandbox = true;
50+
4851
private final AtomicInteger silentExec = new AtomicInteger(1);
4952
private boolean printing = false;
5053
private boolean printingPackage = false;
@@ -76,6 +79,10 @@ public void setPrintingPackage(boolean printingPackage)
7679
@Override
7780
public void checkExec(String cmd)
7881
{
82+
//This was disabled on 02-13-2022, at some point in the future I will fix the compatibility issues and re-enable it.
83+
if(disableExecSandbox)
84+
return;
85+
7986
//incoming command must contain the following or it will be automatically denied
8087
String[] execWhitelist =
8188
{
@@ -316,6 +323,10 @@ public void checkWrite(FileDescriptor fd) {
316323
public void checkWrite(String file) {
317324
if(printing)
318325
System.out.println("Writing: " + file);
326+
327+
//This was disabled on 02-13-2022, at some point in the future I will fix the compatibility issues and re-enable it.
328+
if(disableDiskWriteSandbox)
329+
return;
319330

320331
try
321332
{

0 commit comments

Comments
 (0)