History

Fixed tabs and spaces.

Kasen IO committed 6 years ago

Commit 8124b7d1 parent fb5dbfc1 file · +4 −4Browse 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+4−4
@@ -2363,7 +2363,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 2362 unmodified lines
23632363 }
23642364 }
23652365 else {
2366− // ENTITY SCRIPT WHITELIST STARTS HERE
2366+ // ENTITY SCRIPT WHITELIST STARTS HERE
23672367 QString whitelistPrefix = "[WHITELIST ENTITY SCRIPTS]";
23682368 QList<QString> safeURLS = { "" };
23692369 safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
@@ -2378,16 +2378,16 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 8 unmodified lines
23782378
23792379 bool isInWhitelist = false; // assume unsafe
23802380
2381− if(ScriptEngine::getContext() == "entity_server") {
2381+ if (ScriptEngine::getContext() == "entity_server") {
23822382 isInWhitelist = true;
23832383 } else {
23842384 for (const auto& str : safeURLS) {
23852385 qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN"
2386− << scriptOrURL.startsWith(str);
2386+ << scriptOrURL.startsWith(str);
23872387 if (!str.isEmpty() && scriptOrURL.startsWith(str)) {
23882388 isInWhitelist = true;
23892389 qCDebug(scriptengine) << whitelistPrefix << "Script approved.";
2390− break; // bail early since we found a match
2390+ break; // bail early since we found a match
23912391 }
23922392 }
23932393 }