From 4e16998b450f72e13fc376fa19efb1b29e3c0a54 Mon Sep 17 00:00:00 2001 From: Zander Otavka Date: Tue, 9 Aug 2016 17:36:59 -0700 Subject: [PATCH] Disable loading client scripts over ATP --- interface/src/Application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 3d519d1790..bf85c17370 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5114,8 +5114,10 @@ void Application::setPreviousScriptLocation(const QString& location) { } void Application::loadScriptURLDialog() const { - auto newScript = OffscreenUi::getText(nullptr, "Open and Run Script", "Script URL"); - if (!newScript.isEmpty()) { + auto newScript = OffscreenUi::getText(OffscreenUi::ICON_NONE, "Open and Run Script", "Script URL"); + if (QUrl(newScript).scheme() == "atp") { + OffscreenUi::warning("Error Loading Script", "Cannot load client script over ATP"); + } else if (!newScript.isEmpty()) { DependencyManager::get()->loadScript(newScript); } }