From a6dc494d7ca5bc7af2b58b8226f45e1e254fcf75 Mon Sep 17 00:00:00 2001 From: Kasen IO Date: Tue, 7 Jan 2020 19:40:42 -0500 Subject: [PATCH] housekeeping --- libraries/script-engine/src/ScriptEngine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index aa96e738f3..d1daa9923d 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -2386,7 +2386,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co QString domainSafeIP = nodeList->getDomainHandler().getHostname(); QString domainSafeURL = "hifi://" + currentDomain; for (const auto& str : safeURLS) { - if(domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) { + if (domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) { qCDebug(scriptengine) << whitelistPrefix << "Whitelist Bypassed. Current Domain Host: " << nodeList->getDomainHandler().getHostname() << "Current Domain: " << currentDomain; @@ -2396,9 +2396,9 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co // END CURRENT DOMAIN WHITELIST BYPASS // START CHECKING AGAINST THE WHITELIST - if (ScriptEngine::getContext() == "entity_server" || passList == true) { // If running on the server or waved through, do not engage whitelist. + if (ScriptEngine::getContext() == "entity_server") { // If running on the server, do not engage whitelist. passList = true; - } else { + } else if (!passList) { // If waved through, do not engage whitelist. for (const auto& str : safeURLS) { qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN" << scriptOrURL.startsWith(str);