[Ironpython-users] Restrict referencing of assemblies in hosted environment

Jeff Hardy jdhardy at gmail.com
Thu Oct 18 17:49:36 CEST 2012


On Thu, Oct 18, 2012 at 12:53 AM, Markus Schaber
<m.schaber at 3s-software.com> wrote:
> Hi, Keith,
>
> Von: Keith Rome [mailto:rome at Wintellect.com]
>> Take a look at the PlatformAdaptationLayer class. You can create your own and plug it in to the runtime. This might provide the hooks you are looking for.
>
>> In particular, you should be able to override the LoadAssembly() and LoadAssemblyFromPath() methods to block anything that isn't whitelisted for your host environment.
>
> I did think about that method, but as far as I can see, I won't be able to prevent an AddReference("AssemblyName") for an assembly which is already loaded in the current AppDomain.
>
> I'd be happy to be proved wrong on this, however. :-)

I'm pretty sure you're right. I don't have a particular issue with
adding an assembly whitelist/blacklist option, but I don't really have
a use case and thus don't have a feel for what it should look like. If
you have some ideas, please open an issue and jot down your thoughts
on what you'd like the API to look like.

- Jeff


More information about the Ironpython-users mailing list