From: Matthew G. <mat...@gm...> - 2007-07-03 09:57:14
|
I just committed a patch to allow for a screenshot scripting function. I then checked to see if there were any feature requests to be commented, and found a patch tracker item which I opened a long time ago for this (I had previously implemented this feature before I was part of the project). In the tracker item I saw Rob's comment: "I'm hesitant to add this because I have designed the scripting system to prevent modifying either core settings or the filesystem for security reasons." Which I agree with. However, I would still like the feature. So I ask for your feelings on this, especially Rob. What do you think about the following solution: The scripting screenshot command would only be enabled if some setting were enabled in the configuration, e.g. [main] scripting_sandboxed = true|false This config option would be set to true by default, and this would prevent the screenshot scripting command from functioning. Users who would like to use the feature would have to explicitly enable it by changing this config option. Note that some safety is afforded by the fact that the screenshot command never overwrites existing files. The file name prefix and directory can be specified, but the full file name cannot - Stellarium always adds a numerical suffix to the file name, and will not overwrite existing files. What do you think? Matthew |