diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-26 08:11:51 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-06-26 08:19:57 +0200 |
commit | 619a86cb1e8640e4b834ef1f85bd62b0fb5609f2 (patch) | |
tree | 31e8f78201b225c73423c1d5a2716942014b7d88 /src/nvim/eval.c | |
parent | 10c983fabeae6f2cda93404f3aa4ee814baa43f3 (diff) | |
download | rneovim-619a86cb1e8640e4b834ef1f85bd62b0fb5609f2.tar.gz rneovim-619a86cb1e8640e4b834ef1f85bd62b0fb5609f2.tar.bz2 rneovim-619a86cb1e8640e4b834ef1f85bd62b0fb5609f2.zip |
eval/api: don't allow the API to be called in the sandbox.
Identifying and maintaining a "secure" subset of the API would be too
much busywork. So just disable the entire thing.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index cd2888883b..ca2f4da22c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6669,6 +6669,10 @@ static void float_op_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr) { + if (check_restricted() || check_secure()) { + return; + } + ApiDispatchWrapper fn = (ApiDispatchWrapper)fptr; Array args = ARRAY_DICT_INIT; |