I prototyped a version of the above patch that also spits out a 1 second warning on the title line prior to starting a script on <ALT> entry.
I don't think this is really worth it.
Incidentally, my download script to transfer CHDK to the SD card via ptp does not like this patch either - it forces the download to wait one second between modules while the warning message displays. Are there other unintended things that happen with CHDKPTP and these patches?
I didn't see any with the non-warning version. PTP scripts implicitly enter alt mode when the script runs. I was initially worried this would auto-run the script, but it doesn't. I'm not clear if the fact it does the right thing for PTP scripts is by design or happy accident. I think it has to do with gui_activate_alt_mode seeing kibd_script_run and going directly to scriptGuiHandler
An explicit =enter_alt() over PTP does end up starting the alt script, but enter_alt(); sleep(1000) does not... I haven't tried non-ptp scripts that explicitly use enter_alt/exit_alt
Starting after an enter_alt() call is not desirable, especially over PTP where there isn't a way to kill the script cleanly without physically pressing buttons on the camera (hmm, I should really implement remote kill for 1.3...)
There is still a possible issue with a script being started on <ALT> entry and then overriding the exit key, disabling the title line, and setting the console to "OFF", thereby leaving the user confused if the script dies somehow.
I'm not really worried about "malicious" scripts. My concern is if someone makes a script that is intended to run this way, but makes assumptions about keys that aren't present on a users camera. We have already had a number of cases where users accidentally enabled autostart and were confused about how to get out of it. I don't think we necessarily need to deal with this now, it gets us back to some earlier discussions about what alt mode and script mode actually mean.