History

housekeeping

Kasen IO committed 6 years ago

Commit a6dc4941 parent 13d79fe1 file · +3 −3Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−3
@@ -2386,7 +2386,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 2385 unmodified lines
23862386 QString domainSafeIP = nodeList->getDomainHandler().getHostname();
23872387 QString domainSafeURL = "hifi://" + currentDomain;
23882388 for (const auto& str : safeURLS) {
2389− if(domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) {
2389+ if (domainSafeURL.startsWith(str) || domainSafeIP.startsWith(str)) {
23902390 qCDebug(scriptengine) << whitelistPrefix << "Whitelist Bypassed. Current Domain Host: "
23912391 << nodeList->getDomainHandler().getHostname()
23922392 << "Current Domain: " << currentDomain;
@@ -2396,9 +2396,9 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 3 unmodified lines
23962396 // END CURRENT DOMAIN WHITELIST BYPASS
23972397
23982398 // 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.
24002400 passList = true;
2401− } else {
2401+ } else if (!passList) { // If waved through, do not engage whitelist.
24022402 for (const auto& str : safeURLS) {
24032403 qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN"
24042404 << scriptOrURL.startsWith(str);