Marking a Python COM server safe for Internet Explorer

Duncan Booth duncan at NOSPAMrcp.co.uk
Mon Jul 9 04:33:33 EDT 2001


"Bill Bell" <bill-bell at bill-bell.hamilton.on.ca> wrote in 
news:mailman.994444271.3218.python-list at python.org:

> 2. In order to reach the stage where this message is emitted the 
> control must have been installed on the user's computer (which, I 
> suppose, corresponds to the chicken). 
Moreover, if your control isn't marked as safe for scripting, IE creates 
the control before it pops up the box asking you whether you want to allow 
the script to run. In other words, if your control is written in Python, 
the __init__ method is called *before* the user is asked whether to permit 
it.

When you think about it, this is the only way it can work, since IE cannot 
tell that the control is unsafe until it has created it and asked it 
whether it supports IObjectSafety. So any unsafe control may be created by 
any script, it is just that the script cannot do anything further with the 
control.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list