1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-27 20:16:45 +01:00
Commit graph

16 commits

Author SHA1 Message Date
D. Ben Knoble
cd8a3eaf53
runtime(dist): centralize safe executable check and add vim library ()
Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 10:11:17 +01:00
Christian Brabandt
f7ac0ef509
runtime: don't execute external commands when loading ftplugins
This is a followup to 816fbcc262 (patch
9.0.1833: [security] runtime file fixes)

It basically disables that external commands are run on loading of the
filetype plugin, **unless** the user has set the `g:plugin_exec = 1`
global variable in their configuration or for a specific filetype the
variable g:<filetype>_exec=1.

There are a few more plugins, that may execute system commands like
debchangelog, gitcommit, sh, racket, zsh, ps1 but those do at least
do not run those commands by default during loading of the filetype plugin
(there the command is mostly run as convenience for auto-completion or
to provide documentation lookup).

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <vim@tpope.org>
2023-09-06 20:41:25 +02:00
Bram Moolenaar
079ba76ae7 Update runtime files 2021-10-23 12:08:41 +01:00
Bram Moolenaar
d042dc825c Update runtime files. 2015-11-24 19:18:36 +01:00
Bram Moolenaar
8d04317104 Updated runtime files. 2014-01-23 14:24:41 +01:00
Bram Moolenaar
4b550b4c50 Runtime file updates. 2013-12-15 10:02:33 +01:00
Bram Moolenaar
d09acef44b Updated runtime files. 2012-09-21 14:54:30 +02:00
Bram Moolenaar
446beb48d9 Updated runtime files. 2011-05-10 17:18:44 +02:00
Bram Moolenaar
483c5d80a7 Updated runtime files and translations. 2010-10-20 18:45:33 +02:00
Bram Moolenaar
5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar
446cb837a0 updated for version 7.2a 2008-06-24 21:56:24 +00:00
Bram Moolenaar
2c7a763832 updated for version 7.1b 2007-05-10 18:19:11 +00:00
Bram Moolenaar
57657d85c6 updated for version 7.0e05 2006-04-21 22:12:41 +00:00
Bram Moolenaar
42eeac3552 updated for version 7.0097 2005-06-29 22:40:58 +00:00
Bram Moolenaar
582fd85b02 updated for version 7.0065 2005-03-28 20:58:01 +00:00
Bram Moolenaar
071d4279d6 updated for version 7.0001 2004-06-13 20:20:40 +00:00