Merge pull request #7113 from Elias481/fix/incorrect-usage-of-global-namespace-6874-6785

use dedicated permissions namespace for scriptframe in filterutility
This commit is contained in:
Michael Friedrich 2019-04-16 16:02:16 +02:00 committed by GitHub
commit ecbfdc2732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,8 @@ bool EventQueue::CanProcessEvent(const String& type) const
void EventQueue::ProcessEvent(const Dictionary::Ptr& event)
{
ScriptFrame frame(true);
Namespace::Ptr frameNS = new Namespace();
ScriptFrame frame(true, frameNS);
frame.Sandboxed = true;
try {

View File

@ -188,7 +188,8 @@ std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, c
Expression *permissionFilter;
CheckPermission(user, qd.Permission, &permissionFilter);
ScriptFrame permissionFrame(true);
Namespace::Ptr permissionFrameNS = new Namespace();
ScriptFrame permissionFrame(true, permissionFrameNS);
for (const String& type : qd.Types) {
String attr = type;