Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Nov 7, 2023
2 parents a38e374 + 2a94e98 commit e02454b
Show file tree
Hide file tree
Showing 124 changed files with 3,759 additions and 930 deletions.
12 changes: 12 additions & 0 deletions .github/CODEOWNERS_vim
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/debchangelog.vim @jamessan
runtime/ftplugin/debcontrol.vim @jamessan
runtime/ftplugin/debsources.vim @jamessan
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/eiffel.vim @dkearns
Expand Down Expand Up @@ -163,6 +166,8 @@ runtime/ftplugin/ishd.vim @dkearns
runtime/ftplugin/j.vim @glts
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/json.vim @dbarnett
runtime/ftplugin/json5.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/kconfig.vim @chrisbra
Expand Down Expand Up @@ -355,6 +360,12 @@ runtime/syntax/d.vim @JesseKPhillips
runtime/syntax/dart.vim @pr3d4t0r
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dcl.vim @cecamp
runtime/syntax/deb822sources.vim @jamessan
runtime/syntax/debchangelog.vim @jamessan
runtime/syntax/debcontrol.vim @jamessan
runtime/syntax/debcopyright.vim @jamessan
runtime/syntax/debsources.vim @jamessan
runtime/syntax/dep3patch.vim @jamessan
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/dosbatch.vim @mrdubya
runtime/syntax/dosini.vim @xuhdev
Expand Down Expand Up @@ -477,6 +488,7 @@ runtime/syntax/scss.vim @tpope
runtime/syntax/sdoc.vim @gpanders
runtime/syntax/sed.vim @dkearns
runtime/syntax/sh.vim @cecamp
runtime/syntax/shared/debversions.vim @jamessan
runtime/syntax/sm.vim @cecamp
runtime/syntax/solidity.vim @cothi
runtime/syntax/spec.vim @ignatenkobrain
Expand Down
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ body:
value: |
Thanks for reporting issues of MacVim!
If you want to report a security issue, instead of reporting it here
you can alternatively disclose it on
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=macvim-dev%2Fmacvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fmacvim-dev%2Fmacvim).
They have rewards in the form of money, swag and CVEs.
If you want to report a security issue, instead of reporting it here publicly, please disclose it using the steps listed at https://github.com/macvim-dev/macvim/security/policy.
To make it easier for us to help you please enter detailed information below.
- type: textarea
Expand Down
6 changes: 4 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Reporting a vulnerability

If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
They also have rewards in the form of money, swag and CVEs.
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
[email protected]

This is a private list, read only by the maintainers, but anybody can post, after moderation.

**Please don't publicly disclose the issue until it has been addressed by us.**
10 changes: 9 additions & 1 deletion runtime/autoload/dist/script.vim
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^\%(rexx\|regina\)\>'
return 'rexx'

# Janet
elseif name =~ '^janet\>'
return 'janet'

# Dart
elseif name =~ '^dart\>'
return 'dart'

endif

return ''
Expand Down Expand Up @@ -361,7 +369,7 @@ def DetectFromText(line1: string)

# Strace
# inaccurate fast match first, then use accurate slow match
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
|| line1 =~ '^__libc_start_main'
setl ft=strace

Expand Down
32 changes: 32 additions & 0 deletions runtime/autoload/dist/vim.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
" Vim runtime support library,
" runs the vim9 script version or legacy script version
" on demand (mostly for Neovim compatability)
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Nov 04


" enable the zip and gzip plugin by default, if not set
if !exists('g:zip_exec')
let g:zip_exec = 1
endif

if !exists('g:gzip_exec')
let g:gzip_exec = 1
endif

if !has('vim9script')
function dist#vim#IsSafeExecutable(filetype, executable)
let cwd = getcwd()
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
\ cwd != '.'))
endfunction

finish
endif

def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
return dist#vim9#IsSafeExecutable(filetype, executable)
enddef
17 changes: 17 additions & 0 deletions runtime/autoload/dist/vim9.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
vim9script

# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Oct 25

export def IsSafeExecutable(filetype: string, executable: string): bool
var cwd = getcwd()
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
&& cwd != '.'))
enddef

# Uncomment this line to check for compilation errors early
# defcompile
5 changes: 1 addition & 4 deletions runtime/autoload/gzip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
" safety check, don't execute anything from the current directory
let s:tmp_cwd = getcwd()
let f = (fnamemodify(exepath(name), ":p:h") !=# s:tmp_cwd
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
unlet s:tmp_cwd
let f = dist#vim#IsSafeExecutable('gzip', name)
if !f
echoerr "Warning: NOT executing " .. name .. " from current directory!"
endif
Expand Down
3 changes: 0 additions & 3 deletions runtime/autoload/netrw.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ fun! netrw#Explore(indx,dosplit,style,...)
2match none
if exists("s:explore_match") | unlet s:explore_match | endif
if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
echo " "
" call Decho("cleared explore match list",'~'.expand("<slnum>"))
endif

Expand Down Expand Up @@ -5730,8 +5729,6 @@ fun! s:NetrwClearExplore()
if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif
if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif
" redraw!
echo " "
echo " "
" call Dret("s:NetrwClearExplore")
endfun

Expand Down
17 changes: 13 additions & 4 deletions runtime/autoload/tar.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Jan 07, 2020
" Version: 32
" Date: Nov 05, 2023
" Version: 32a (with modifications from the Vim Project)
" Maintainer: Charles E Campbell <[email protected]>
" License: Vim License (see vim's :help license)
"
Expand All @@ -22,7 +22,7 @@
if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v32"
let g:loaded_tar= "v32a"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
Expand Down Expand Up @@ -208,7 +208,16 @@ fun! tar#Browse(tarfile)
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~# '\c\%(warning\|error\|inappropriate\|unrecognized\)')
" If there was an error message, the last line probably matches some keywords but
" should also contain whitespace for readability. Make sure not to match a
" filename that contains the keyword (error/warning/unrecognized/inappropriate, etc)
"
" FIXME:is this actually necessary? In case of an error, we should probably
" have noticed in the if statement above since tar should have exited
" with a non-zero exit code.
if line("$") == curlast || ( line("$") == (curlast + 1) &&
\ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
\ getline("$") =~ '\s' )
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
keepj sil! %d
Expand Down
6 changes: 1 addition & 5 deletions runtime/autoload/zip.vim
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ if !exists("g:zip_extractcmd")
let g:zip_extractcmd= g:zip_unzipcmd
endif

let s:tmp_cwd = getcwd()
if (fnamemodify(exepath(g:zip_unzipcmd), ":p:h") ==# getcwd()
\ && (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) == -1 || s:tmp_cwd == '.'))
unlet s:tmp_cwd
if !dist#vim#IsSafeExecutable('zip', g:zip_unzipcmd)
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
finish
endif
unlet s:tmp_cwd

" ----------------
" Functions: {{{1
Expand Down
Loading

0 comments on commit e02454b

Please sign in to comment.