mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Made requested changes
This commit is contained in:
parent
82dc6d197a
commit
0f3e8d2101
1 changed files with 2 additions and 6 deletions
|
@ -3182,7 +3182,6 @@ static const QUrl AUTHORIZED_EXTERNAL_QML_SOURCE { "https://content.highfidelity
|
|||
|
||||
void Application::initializeUi() {
|
||||
|
||||
|
||||
// Allow remote QML content from trusted sources ONLY
|
||||
{
|
||||
auto defaultUrlValidator = OffscreenQmlSurface::getUrlValidator();
|
||||
|
@ -3201,18 +3200,15 @@ void Application::initializeUi() {
|
|||
|
||||
bool isInWhitelist = false; // assume unsafe
|
||||
for (const auto& str : safeURLS) {
|
||||
qDebug() << "url.toString().startsWith(str) = " << url.toString().startsWith(str);
|
||||
qDebug() << "str.endsWith('.qml ') = " << str.endsWith(".qml");
|
||||
if (!str.isEmpty() && str.endsWith(".qml") && url.toString().endsWith(".qml") &&
|
||||
url.toString().startsWith(str)) {
|
||||
qDebug() << "found matching url!" << url.host();
|
||||
qCDebug(interfaceapp) << "Found matching url!" << url.host();
|
||||
isInWhitelist = true;
|
||||
return true;
|
||||
break; // bail early since we found a match
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "no matching url :c" << url.host();
|
||||
qCDebug(interfaceapp) << "No matching url" << url.host();
|
||||
return defaultUrlValidator(url);
|
||||
};
|
||||
OffscreenQmlSurface::setUrlValidator(newValidator);
|
||||
|
|
Loading…
Reference in a new issue