diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index a3f685f95f..75fd33bafb 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -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; }