Mercurial > vim
comparison src/getchar.c @ 16726:fbab59a5ee6b v8.1.1365
patch 8.1.1365: source command doesn't check for the sandbox
commit https://github.com/vim/vim/commit/53575521406739cf20bbe4e384d88e7dca11f040
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 22 22:38:25 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 May 2019 22:45:05 +0200 |
parents | 329e28ed10fd |
children | ef00b6bc186b |
comparison
equal
deleted
inserted
replaced
16725:719dbc0bed23 | 16726:fbab59a5ee6b |
---|---|
1405 if (curscript + 1 == NSCRIPT) | 1405 if (curscript + 1 == NSCRIPT) |
1406 { | 1406 { |
1407 emsg(_(e_nesting)); | 1407 emsg(_(e_nesting)); |
1408 return; | 1408 return; |
1409 } | 1409 } |
1410 | |
1411 // Disallow sourcing a file in the sandbox, the commands would be executed | |
1412 // later, possibly outside of the sandbox. | |
1413 if (check_secure()) | |
1414 return; | |
1415 | |
1410 #ifdef FEAT_EVAL | 1416 #ifdef FEAT_EVAL |
1411 if (ignore_script) | 1417 if (ignore_script) |
1412 /* Not reading from script, also don't open one. Warning message? */ | 1418 /* Not reading from script, also don't open one. Warning message? */ |
1413 return; | 1419 return; |
1414 #endif | 1420 #endif |