Skip to content

Commit

Permalink
Revert "Made changes to restrict access to encrypted odaPassword from…
Browse files Browse the repository at this point in the history
… java script."

This reverts commit 8fee161.
  • Loading branch information
ravikirankatneni committed Mar 12, 2020
1 parent 3d4f3ba commit 16f98d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.eclipse.birt.core.script.ScriptContext;
import org.eclipse.birt.core.script.functionservice.IScriptFunctionContext;
import org.eclipse.birt.data.engine.api.IDataScriptEngine;
import org.eclipse.birt.report.model.core.JavaScriptExecutionStatus;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ImporterTopLevel;
import org.mozilla.javascript.LazilyLoadedCtor;
Expand Down Expand Up @@ -287,7 +286,6 @@ public Object evaluate( ScriptContext scriptContext,
// .getScriptText( );
try
{
JavaScriptExecutionStatus.setExeucting(true);
Script script = ( (CompiledJavascript) compiledScript )
.getCompiledScript( );
Object value = script.exec( context, getJSScope( scriptContext ) );
Expand All @@ -302,8 +300,6 @@ public Object evaluate( ScriptContext scriptContext,
throw new CoreException( ResourceConstants.INVALID_EXPRESSION,
e.getMessage( ),
e );
}finally {
JavaScriptExecutionStatus.remove();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.ListIterator;
import java.util.Map;


import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.activity.NotificationEvent;
Expand Down Expand Up @@ -529,8 +528,6 @@ public abstract class DesignElement
* this limit, the exceeding part will be shown as "...".
*/
private static final int MAX_DISPLAY_LABEL_LEN = 30;

private static final String ODA_PASSWORD = "odaPassword";

/**
* Elements have an optional name. The name may be required by some element
Expand Down Expand Up @@ -968,23 +965,12 @@ public DesignElement getDynamicExtendsElement( Module module )

public Object getProperty( Module module, String propName )
{



ElementPropertyDefn prop = getPropertyDefn( propName );

// If the property is not found, then the value is null.

if ( prop == null )
return null;

if ( ODA_PASSWORD.contentEquals( propName )
&& prop.isEncryptable( ) && getEncryptionID( prop ) != null
&& JavaScriptExecutionStatus.isExecuting( ) )
{
throw new RuntimeException(
"Invalid operation: Can not access encrypted password from script" );
}

return getProperty( module, prop );
}
Expand Down

This file was deleted.

0 comments on commit 16f98d5

Please sign in to comment.