diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-30 12:39:59 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-30 12:41:49 +0100 |
commit | 812e027e1d5a4f83394069edd67bdf8404ffa2bb (patch) | |
tree | fe11aee398ea3ddfa0a8117c566e2ed1c6435883 /src/libexpr/primops.cc | |
parent | f1c555cef870654cdaf232b5d08fdbba0bf06add (diff) |
Add option allowed-uris
This allows network access in restricted eval mode.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 22925ba4d..cd0dfbc03 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1937,8 +1937,7 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v, } else url = state.forceStringNoCtx(*args[0], pos); - if (state.restricted) - throw Error(format("'%1%' is not allowed in restricted mode") % who); + state.checkURI(url); Path res = getDownloader()->downloadCached(state.store, url, unpack, name, expectedHash); mkString(v, res, PathSet({res})); |