From 77d5148f0d79c57d5d1ad3951f3692c9098cf194 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 30 Mar 2017 03:17:17 +0100 Subject: Reject import URLs for now --- libsolidity/interface/StandardCompiler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libsolidity/interface') diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 42404a1c..4bc8f8e1 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -143,7 +143,12 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) return formatFatalError("JSONError", "No input sources specified."); for (auto const& sourceName: sources.getMemberNames()) - m_compilerStack.addSource(sourceName, sources[sourceName]["content"].asString()); + if (sources[sourceName]["content"].isString()) + m_compilerStack.addSource(sourceName, sources[sourceName]["content"].asString()); + else if (sources[sourceName]["urls"].isArray()) + return formatFatalError("UnimplementedFeatureError", "Input URLs not supported yet."); + else + return formatFatalError("JSONError", "Invalid input source specified."); Json::Value const& settings = _input.get("settings", Json::Value()); -- cgit