1
0
Fork 0
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:
Robert Hensing 2023-12-06 12:41:47 +01:00
parent 5c917c3204
commit 91ba7b2307
3 changed files with 124 additions and 5 deletions

View file

@ -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;