Merge pull request #8406 from AlexanderOtavka/script-load

Disable loading client scripts over ATP
This commit is contained in:
James B. Pollack 2016-08-12 11:01:14 -07:00 committed by GitHub
commit 7866786da9

View file

@ -5114,8 +5114,10 @@ void Application::setPreviousScriptLocation(const QString& location) {
} }
void Application::loadScriptURLDialog() const { void Application::loadScriptURLDialog() const {
auto newScript = OffscreenUi::getText(nullptr, "Open and Run Script", "Script URL"); auto newScript = OffscreenUi::getText(OffscreenUi::ICON_NONE, "Open and Run Script", "Script URL");
if (!newScript.isEmpty()) { if (QUrl(newScript).scheme() == "atp") {
OffscreenUi::warning("Error Loading Script", "Cannot load client script over ATP");
} else if (!newScript.isEmpty()) {
DependencyManager::get<ScriptEngines>()->loadScript(newScript); DependencyManager::get<ScriptEngines>()->loadScript(newScript);
} }
} }