mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 06:00:10 +02:00
Add community-apps repo to default QML whitelist.
This commit is contained in:
parent
35da6721ea
commit
84e5a27b32
1 changed files with 13 additions and 7 deletions
|
@ -3167,7 +3167,7 @@ void Application::showLoginScreen() {
|
|||
#endif
|
||||
}
|
||||
|
||||
static const QUrl AUTHORIZED_EXTERNAL_QML_SOURCE { "https://content.highfidelity.com/Experiences/Releases" };
|
||||
static const QUrl AUTHORIZED_EXTERNAL_QML_SOURCE { "https://kasenvr.github.io/community-apps/applications" };
|
||||
|
||||
void Application::initializeUi() {
|
||||
|
||||
|
@ -3188,12 +3188,18 @@ void Application::initializeUi() {
|
|||
// END PULL SAFEURLS FROM INTERFACE.JSON Settings
|
||||
|
||||
bool isInWhitelist = false; // assume unsafe
|
||||
for (const auto& str : safeURLS) {
|
||||
if (!str.isEmpty() && str.endsWith(".qml") && url.toString().endsWith(".qml") &&
|
||||
url.toString().startsWith(str)) {
|
||||
qCDebug(interfaceapp) << "Found matching url!" << url.host();
|
||||
isInWhitelist = true;
|
||||
return true;
|
||||
|
||||
if (AUTHORIZED_EXTERNAL_QML_SOURCE.isParentOf(url)) {
|
||||
isInWhitelist = true;
|
||||
return true;
|
||||
} else {
|
||||
for (const auto& str : safeURLS) {
|
||||
if (!str.isEmpty() && str.endsWith(".qml") && url.toString().endsWith(".qml") &&
|
||||
url.toString().startsWith(str)) {
|
||||
qCDebug(interfaceapp) << "Found matching url!" << url.host();
|
||||
isInWhitelist = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue