Accessing elevated permission CLR in Mono

Jan 6, 2011 at 5:14 PM

I am doing the following:

 

JintEngine engine=new JintEngine();
engine.Run("System.IO.File.ReadAllText('/some/file');");

 

Under Windows using Microsoft .NET, I get a security exception (which is what I expect to happen), but on a Mac using Mono it reads the file in fine. If I set AllowClr=false, it correctly disables all access to CLR functions, but I would just like to use Jint in a Low Security context and allow access to "safe" CLR functionality. Does anyone else have this issue? Is there anything extra that needs to be done in order to get this working in Mono?

Coordinator
Jan 6, 2011 at 5:29 PM

The behavior in Jint is correct from what you describe. The issue might come from Mono. Would you be able to check CAS in Mono, by trying to define a secured boundary and add a FilePermission ?