aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2019-06-24 12:08:57 -0400
committerGitHub <noreply@github.com>2019-06-24 12:08:57 -0400
commit8c7e41f596e60031099c36c915a3f610b893d60e (patch)
treefe0fe669049839b8a70f59878e0ee4152e1a3c7a /src/nvim/getchar.c
parent8d4a655ace746c9ad5050b2c37dc5133dcb74fc4 (diff)
parent6cb44602075ccfe045e2864513978e2f5a58fe87 (diff)
downloadrneovim-8c7e41f596e60031099c36c915a3f610b893d60e.tar.gz
rneovim-8c7e41f596e60031099c36c915a3f610b893d60e.tar.bz2
rneovim-8c7e41f596e60031099c36c915a3f610b893d60e.zip
[RFC] vim-patch:8.1.1365,8.1.1366,8.1.1367,8.1.1368,8.1.1382,8… (#10309)
[RFC] vim-patch:8.1.1365,8.1.1366,8.1.1367,8.1.1368,8.1.1382,8.1.1401
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 44e4e09486..10937879a1 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1253,9 +1253,17 @@ openscript (
EMSG(_(e_nesting));
return;
}
- if (ignore_script)
- /* Not reading from script, also don't open one. Warning message? */
+
+ // Disallow sourcing a file in the sandbox, the commands would be executed
+ // later, possibly outside of the sandbox.
+ if (check_secure()) {
return;
+ }
+
+ if (ignore_script) {
+ // Not reading from script, also don't open one. Warning message?
+ return;
+ }
if (scriptin[curscript] != NULL) /* already reading script */
++curscript;