patterns: Disallow calling of dangerous functions by default

Closes #330
This commit is contained in:
WerWolv
2021-12-19 12:32:15 +01:00
parent 0efb226c2f
commit 376cb01a16
13 changed files with 128 additions and 25 deletions

View File

@@ -127,6 +127,11 @@ namespace hex::pl {
this->m_scopes.clear();
this->m_aborted = false;
if (this->m_allowDangerousFunctions == DangerousFunctionPermission::Deny)
this->m_allowDangerousFunctions = DangerousFunctionPermission::Ask;
this->m_dangerousFunctionCalled = false;
ON_SCOPE_EXIT {
this->m_envVariables.clear();
};