Browse Source

Rename securityScript variable to unsecureScript.

tags/v1.3.0
Andrew Belt 4 years ago
parent
commit
d32cfb69e2
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      src/Prototype.cpp

+ 6
- 6
src/Prototype.cpp View File

@@ -129,7 +129,7 @@ struct Prototype : Module {
efsw_watcher efsw = NULL; efsw_watcher efsw = NULL;


/** Script that has not yet been approved to load */ /** Script that has not yet been approved to load */
std::string securityScript;
std::string unsecureScript;
bool securityRequested = false; bool securityRequested = false;
bool securityAccepted = false; bool securityAccepted = false;


@@ -159,9 +159,9 @@ struct Prototype : Module {


void process(const ProcessArgs& args) override { void process(const ProcessArgs& args) override {
// Load security-sandboxed script if the security warning message is accepted. // Load security-sandboxed script if the security warning message is accepted.
if (securityScript != "" && securityAccepted) {
setScript(securityScript);
securityScript = "";
if (unsecureScript != "" && securityAccepted) {
setScript(unsecureScript);
unsecureScript = "";
} }


// Frame divider for reducing sample rate // Frame divider for reducing sample rate
@@ -336,7 +336,7 @@ struct Prototype : Module {
std::string script = this->script; std::string script = this->script;
// If we haven't accepted the security of this script, serialize the security-sandboxed script anyway. // If we haven't accepted the security of this script, serialize the security-sandboxed script anyway.
if (script == "") if (script == "")
script = securityScript;
script = unsecureScript;
json_object_set_new(rootJ, "script", json_stringn(script.data(), script.size())); json_object_set_new(rootJ, "script", json_stringn(script.data(), script.size()));


return rootJ; return rootJ;
@@ -359,7 +359,7 @@ struct Prototype : Module {
// Request security warning message // Request security warning message
securityAccepted = false; securityAccepted = false;
securityRequested = true; securityRequested = true;
securityScript = script;
unsecureScript = script;
} }
} }
} }


Loading…
Cancel
Save