[IronPython] Security of DLR host

Curt Hagenlocher curt at hagenlocher.org
Tue Aug 5 06:00:41 CEST 2008


On Sun, Aug 3, 2008 at 8:39 AM, Pavel Šavara <pavel.savara at gmail.com> wrote:

> > With Silverlight you can use the Platform Adaptation Layer to control
> > imports though. The DLR hosting specs has some details on this
> (Silverlight
> > uses the PAL so that imports are resolved by searching inside the xap
> file -
> > a modified PAL could ban imports altogether).
>
> I looked at your articles about that on voidspace. Unfortunately in
> last sdl-sdk things look different.
> There is no direct way how to change PAL anymore.


In what will be released shortly as the next beta of IronPython, you replace
the PAL by deriving a custom class from ScriptHost and overriding the
PlatformAdaptationLayer property.  When you create a ScriptRuntime, you
specify the host by setting ScriptRuntimeSetup.HostType to equal the type of
your derived class.  That's exactly what the Microsoft.Scripting.Silverlight
project does.

It's quite possible that this was already how it worked in the previous
beta, but I don't have those sources handy.

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080804/17a8e496/attachment.html>


More information about the Ironpython-users mailing list