QtScript and restricting IOScr
-
wrote on 1 Jul 2015, 17:59 last edited by
Hi,
I need scripting in my Qt App and since I am already using Qt, it makes sense to use QtScript.
But the script is handling sensitive data and can be potentially be written by a third person. For that reason I require that no data may be send to the outside except by functions which I define.
So now writing to files, no connecting to the internet, no (something I do not think of right now).Is it possible to restrict the QtScript interpreter in this way? For example by not loading some libraries or so?
Thanks!
Nathan -
wrote on 2 Jul 2015, 22:34 last edited by
I'm not sure this is the right approach but you could provide your own interface functions (overrides so to speak) for the common things you want to prevent. Those overwrites would still allow the script to run but you'd intercept and not allow the desired action or perhaps throw a script exception.
1/2