mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
avoid failing scheme check
This commit is contained in:
parent
7362bf16c1
commit
9229a07f6a
1 changed files with 2 additions and 8 deletions
|
@ -965,15 +965,9 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
for (const auto& whiteListedPrefix : _entityScriptSourceWhitelist) {
|
||||
auto whiteListURL = QUrl::fromUserInput(whiteListedPrefix);
|
||||
|
||||
if (entityScriptURL.scheme() != whiteListURL.scheme()) {
|
||||
// isParentOf will be false if the schemes are different, but
|
||||
}
|
||||
|
||||
qDebug() << "Comparing" << entityScriptURL << "to" << whiteListURL;
|
||||
qDebug() << whiteListURL.isParentOf(entityScriptURL);
|
||||
|
||||
// check if this script URL matches the whitelist domain and, optionally, is beneath the path
|
||||
if (whiteListURL.isParentOf(entityScriptURL)) {
|
||||
if (entityScriptURL.host().compare(whiteListURL.host(), Qt::CaseInsensitive) == 0 &&
|
||||
entityScriptURL.path().startsWith(whiteListURL.path(), Qt::CaseInsensitive)) {
|
||||
passedWhiteList = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue