New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support --allow-path in the CLI #2133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps call it --allow-paths
and please add an explanation in the documentation.
solc/CommandLineInterface.cpp
Outdated
(g_argMetadataLiteral.c_str(), "Store referenced sources are literal data in the metadata output.") | ||
( | ||
g_argAllowPath.c_str(), | ||
po::value<string>()->value_name("path"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path(s)
?
226aadd
to
ef9e809
Compare
Changed. Please review the docs, don't know if the sentence is true there :) |
Changelog.md
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
Features: | |||
* Support ``interface`` contracts. | |||
* Commandline interface: Support ``--allow-paths`` to define trusted import paths. Note: the | |||
path(s) of the supplied contract(s) is always trusted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be supplied source file(s)
.
docs/using-the-compiler.rst
Outdated
@@ -29,6 +29,8 @@ files reside, so things like ``import "/etc/passwd";`` only work if you add ``=/ | |||
|
|||
If there are multiple matches due to remappings, the one with the longest common prefix is selected. | |||
|
|||
Important to note is that paths of included sources files and paths defined by remappings are allowed to include, but everything else is rejected. Additional paths can be added via the ``--allow-paths /sample/path,/another/sample/path`` switch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paths of source files specified on the commandline and paths defined by remappings...
It is probably better to put that in line 16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded, still not sure. Where exactly at line 16 should it go?
09899ca
to
8bf8420
Compare
No description provided.