jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rony G. Flatscher" <Rony.Flatsc...@wu-wien.ac.at>
Subject Re: BSF with Rhino, Java 2 Security problem
Date Mon, 05 Mar 2007 13:40:34 GMT
Hi Mike,

Mike Blan wrote:
> I will post this in case anyone else runs into same. This worked for my
> application.
>
> See   https://bugzilla.mozilla.org/show_bug.cgi?id=190841#c3 bugzilla 
>
> In   cookxml.cookjs.util.ProxyHandler.invoke(...)
>
> 			// return JavaAdapter.callMethod (m_delegate, function, args,
> convertionMask);
> 			// JavaAdapter.callMethod in Rhino 1.6.4 requires at least a null factory
> reference.
> 			ContextFactory factory = null;
> 			return JavaAdapter.callMethod(factory, m_delegate, function, args,
> convertionMask);
>
> In  org.apache.bsf.engines.javascript.JavaScriptEngine.call(...)  and
> eval(...) 
>
>             cx.setOptimizationLevel(-1);
>             cx.setGeneratingDebug(false);
>             cx.setGeneratingSource(false);
>             //cx.setOptimizationLevel(0); 
>             cx.setDebugger(null, null);
>             // Mozilla Bug 190841 – Generated classes have too low
> privileges 
>             ProxyJavaAdapter.init (cx, global, true);
>             
>             retval =
>                 ((Function) fun).call(cx, global, global, args);
>   
Could you be so kind and supply a patch under the Apache license?
[AFAICS the ProxyJavaAdapter.init() needs to be invoked from the
BSF-Javascript/Rhino engine?]


Regards,

---rony


---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org


Mime
View raw message