[IronPython] Security of DLR host

Jimmy Schementi Jimmy.Schementi at microsoft.com
Tue Aug 5 08:36:58 CEST 2008


Curt, that's how the previous beta worked, so things haven't really changed. I think what Paval means is that there's a child PAL, in SL's case a BrowserPAL, which inherits from PlatformAdaptationLayer. In Silverlight we also had a BrowserScriptHost, which inherited from ScriptHost, and ScriptRuntimeSetup.HostType is set to that BrowserScriptHost instance.

Anyway, things are the same ... =P

~js

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Monday, August 04, 2008 9:01 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Security of DLR host

On Sun, Aug 3, 2008 at 8:39 AM, Pavel Šavara <pavel.savara at gmail.com<mailto: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<mailto:curt at hagenlocher.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080804/d598ca72/attachment.html>


More information about the Ironpython-users mailing list