Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
QtScript and restricting IOScr
RudolfVonKrugstein last edited by
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?
SysTech 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.