mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:8.1.1365: source command doesn't check for the sandbox
Problem: Source command doesn't check for the sandbox. (Armin Razmjou)
Solution: Check for the sandbox when sourcing a file.
5357552140
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user