Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2386,7 +2386,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 2385 unmodified lines | ||
| 2386 | 2386 | QString domainSafeIP = nodeList->getDomainHandler().getHostname(); |
| 2387 | 2387 | QString domainSafeURL = "hifi://" + currentDomain; |
| 2388 | 2388 | for (const auto& str : safeURLS) { |
| 2389 | − if(domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) { | |
| 2389 | + if (domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) { | |
| 2390 | 2390 | qCDebug(scriptengine) << whitelistPrefix << "Whitelist Bypassed. Current Domain Host: " |
| 2391 | 2391 | << nodeList->getDomainHandler().getHostname() |
| 2392 | 2392 | << "Current Domain: " << currentDomain; |
| @@ -2396,9 +2396,9 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 3 unmodified lines | ||
| 2396 | 2396 | // END CURRENT DOMAIN WHITELIST BYPASS |
| 2397 | 2397 | |
| 2398 | 2398 | // START CHECKING AGAINST THE WHITELIST |
| 2399 | − if (ScriptEngine::getContext() == "entity_server" || passList == true) { // If running on the server or waved through, do not engage whitelist. | |
| 2399 | + if (ScriptEngine::getContext() == "entity_server") { // If running on the server, do not engage whitelist. | |
| 2400 | 2400 | passList = true; |
| 2401 | − } else { | |
| 2401 | + } else if (!passList) { // If waved through, do not engage whitelist. | |
| 2402 | 2402 | for (const auto& str : safeURLS) { |
| 2403 | 2403 | qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN" |
| 2404 | 2404 | << scriptOrURL.startsWith(str); |