Skip to content

Commit df2d30a

Browse files
authored
Revert "restrict access to encrypted odaPassword from java script" (#2258)
1 parent 92a952c commit df2d30a

File tree

3 files changed

+0
-59
lines changed

3 files changed

+0
-59
lines changed

data/org.eclipse.birt.report.engine.script.javascript/src/org/eclipse/birt/report/engine/javascript/JavascriptEngine.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.eclipse.birt.core.script.ScriptContext;
3333
import org.eclipse.birt.core.script.functionservice.IScriptFunctionContext;
3434
import org.eclipse.birt.data.engine.api.IDataScriptEngine;
35-
import org.eclipse.birt.report.model.core.JavaScriptExecutionStatus;
3635
import org.mozilla.javascript.Context;
3736
import org.mozilla.javascript.ImporterTopLevel;
3837
import org.mozilla.javascript.LazilyLoadedCtor;
@@ -249,7 +248,6 @@ public Object evaluate(ScriptContext scriptContext, ICompiledScript compiledScri
249248
// String source = ( (CompiledJavascript) compiledScript )
250249
// .getScriptText( );
251250
try {
252-
JavaScriptExecutionStatus.setExeucting(true);
253251
Script script = ((CompiledJavascript) compiledScript).getCompiledScript();
254252
Object value = script.exec(context, getJSScope(scriptContext));
255253
return jsToJava(value);
@@ -259,8 +257,6 @@ public Object evaluate(ScriptContext scriptContext, ICompiledScript compiledScri
259257
// ResourceConstants.JAVASCRIPT_COMMON_ERROR,
260258
// new Object[]{source, e.getMessage( )}, e );
261259
throw new CoreException(ResourceConstants.INVALID_EXPRESSION, e.getMessage(), e);
262-
} finally {
263-
JavaScriptExecutionStatus.remove();
264260
}
265261
}
266262

model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/DesignElement.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,6 @@ public abstract class DesignElement implements IDesignElement, IPropertySet, IDe
530530
*/
531531
private static final int MAX_DISPLAY_LABEL_LEN = 30;
532532

533-
private static final String ODA_PASSWORD = "odaPassword";
534-
535533
/**
536534
* Elements have an optional name. The name may be required by some element
537535
* types. If so, the derived element class should enforce the use of the name.
@@ -956,12 +954,6 @@ public Object getProperty(Module module, String propName) {
956954
return null;
957955
}
958956

959-
if (ODA_PASSWORD.contentEquals(propName) && prop.isEncryptable() && getEncryptionID(prop) != null
960-
&& JavaScriptExecutionStatus.isExecuting()) {
961-
// throw new RuntimeException("Invalid operation: Can not access encrypted password from script");
962-
return null;
963-
}
964-
965957
return getProperty(module, prop);
966958
}
967959

model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/JavaScriptExecutionStatus.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)