mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
isAllowedURI: Extract function and test
This commit is contained in:
parent
5c917c3204
commit
91ba7b2307
3 changed files with 124 additions and 5 deletions
|
@ -837,6 +837,11 @@ std::string showType(const Value & v);
|
|||
*/
|
||||
SourcePath resolveExprPath(SourcePath path);
|
||||
|
||||
/**
|
||||
* Whether a URI is allowed, assuming restrictEval is enabled
|
||||
*/
|
||||
bool isAllowedURI(std::string_view uri, const Strings & allowedPaths);
|
||||
|
||||
struct InvalidPathError : EvalError
|
||||
{
|
||||
Path path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue