// Security.java

package ed.security;

import ed.js.engine.*;

public class Security {

    public final static boolean OFF = Boolean.getBoolean( "NO-SECURITY" );
    final static boolean TEST_BYPASS = Boolean.getBoolean("ed.js.engine.SECURITY_BYPASS");

    final static String SECURE[] = new String[]{ 
        Convert.DEFAULT_PACKAGE + "._data_corejs_" , 
        Convert.DEFAULT_PACKAGE + "._data_sites_admin_" , 
        Convert.DEFAULT_PACKAGE + "._data_sites_www_" , 
        Convert.DEFAULT_PACKAGE + ".lastline"
    };
    
    public static boolean isCoreJS(){
        if ( OFF )
            return true;

        String topjs = getTopJS();
        if ( topjs == null ) {
            return false;
        }

        if (TEST_BYPASS && _isTestFrameworkHack()) {
            return true;
        }

        
        for ( int i=0; i<SECURE.length; i++ )
            if ( topjs.startsWith( SECURE[i] ) )
                return true;
        
        return false;
    }

    static boolean _isTestFrameworkHack() {
        StackTraceElement[] st = Thread.currentThread().getStackTrace();

        for(StackTraceElement e : st) {
            if ( e.getClassName().startsWith("ed.js.engine.JSTestInstance"))
                return true;
        }

        return false;
    }

    public static String getTopJS(){

        StackTraceElement[] st = Thread.currentThread().getStackTrace();
        
        for ( int i=0; i<st.length; i++ ){
            StackTraceElement e = st[i];
            if ( e.getClassName().startsWith( Convert.DEFAULT_PACKAGE + "." ) )
                return e.getClassName();
        }

        return null;
    }
}

@@ -160,99 +160,8 @@
 %22 );
-%0A    final static boolean TEST_BYPASS = Boolean.getBoolean(%22ed.js.engine.SECURITY_BYPASS%22);
 %0A%0A  
@@ -625,98 +625,8 @@
   %7D%0A
-%0A        if (TEST_BYPASS && _isTestFrameworkHack()) %7B%0A            return true;%0A        %7D%0A%0A
     
@@ -746,32 +746,32 @@
    return true;%0A
+
         %0A       
@@ -796,312 +796,8 @@
  %7D%0A%0A
-    static boolean _isTestFrameworkHack() %7B%0A        StackTraceElement%5B%5D st = Thread.currentThread().getStackTrace();%0A%0A        for(StackTraceElement e : st) %7B%0A            if ( e.getClassName().startsWith(%22ed.js.engine.JSTestInstance%22))%0A                return true;%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A
     

Remove the security bypass hack. It's not needed anymore.