mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Fixed tabs and spaces.
This commit is contained in:
parent
fb5dbfc52a
commit
8124b7d4a1
1 changed files with 4 additions and 4 deletions
|
@ -2363,7 +2363,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
|
|||
}
|
||||
}
|
||||
else {
|
||||
// ENTITY SCRIPT WHITELIST STARTS HERE
|
||||
// ENTITY SCRIPT WHITELIST STARTS HERE
|
||||
QString whitelistPrefix = "[WHITELIST ENTITY SCRIPTS]";
|
||||
QList<QString> safeURLS = { "" };
|
||||
safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
|
||||
|
@ -2378,16 +2378,16 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
|
|||
|
||||
bool isInWhitelist = false; // assume unsafe
|
||||
|
||||
if(ScriptEngine::getContext() == "entity_server") {
|
||||
if (ScriptEngine::getContext() == "entity_server") {
|
||||
isInWhitelist = true;
|
||||
} else {
|
||||
for (const auto& str : safeURLS) {
|
||||
qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN"
|
||||
<< scriptOrURL.startsWith(str);
|
||||
<< scriptOrURL.startsWith(str);
|
||||
if (!str.isEmpty() && scriptOrURL.startsWith(str)) {
|
||||
isInWhitelist = true;
|
||||
qCDebug(scriptengine) << whitelistPrefix << "Script approved.";
|
||||
break; // bail early since we found a match
|
||||
break; // bail early since we found a match
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue