diff options
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 44e4e09486..d4154a3748 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1253,6 +1253,13 @@ openscript ( EMSG(_(e_nesting)); return; } + + // 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; |