aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-01-30 06:09:05 +0800
committerchriseth <c@ethdev.com>2016-01-30 06:11:16 +0800
commit0c5d892dbac95ae2418fcfc29ddfd23e4effa5ff (patch)
tree2c9d9ce18c360e74d72ec62e7ecfddb11d7d7c41 /solc/CommandLineInterface.h
parentbdbb7d8a40d787104a5b6a9de265bf972daeac86 (diff)
downloaddexon-solidity-0c5d892dbac95ae2418fcfc29ddfd23e4effa5ff.tar.gz
dexon-solidity-0c5d892dbac95ae2418fcfc29ddfd23e4effa5ff.tar.zst
dexon-solidity-0c5d892dbac95ae2418fcfc29ddfd23e4effa5ff.zip
Only allow including from allowed directories.
Diffstat (limited to 'solc/CommandLineInterface.h')
-rw-r--r--solc/CommandLineInterface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.h b/solc/CommandLineInterface.h
index 7fdc9c0d..d288b5c1 100644
--- a/solc/CommandLineInterface.h
+++ b/solc/CommandLineInterface.h
@@ -24,6 +24,7 @@
#include <libsolidity/interface/CompilerStack.h>
#include <memory>
#include <boost/program_options.hpp>
+#include <boost/filesystem/path.hpp>
namespace dev
{
@@ -80,6 +81,8 @@ private:
std::map<std::string, std::string> m_sourceCodes;
/// list of path prefix remappings, e.g. github.com/ethereum -> /usr/local/ethereum
std::vector<std::pair<std::string, std::string>> m_remappings;
+ /// list of allowed directories to read files from
+ std::vector<boost::filesystem::path> m_allowedDirectories;
/// map of library names to addresses
std::map<std::string, h160> m_libraries;
/// Solidity compiler stack