From 040c5deb3f7a1e9457f4eebd395cd1a4c41c4102 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 21 May 2026 07:52:30 +0800 Subject: [PATCH] vim-patch:1294861: runtime(getscript,vimball,rust): Use correct shellescape() form for ! ex cmd Problem: shellescape() called without {special} flag for :! ex command Solution: Pass 1 as second argument to shellescape() in :! contexts related: Commit: 3fb5e58fbc63d86a3e65f1a141b0d67af2 (patch 9.2.0479: [security]: runtime(tar): command injection in tar plugin) https://github.com/vim/vim/commit/129486193c16bb5c0208eff5501f9e665b7c4803 Co-authored-by: Christian Brabandt --- runtime/autoload/rust.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/autoload/rust.vim b/runtime/autoload/rust.vim index 5ccbf4b382..6510f23be7 100644 --- a/runtime/autoload/rust.vim +++ b/runtime/autoload/rust.vim @@ -1,5 +1,6 @@ " Description: Helper functions for Rust commands/mappings " Last Modified: 2023-09-11 +" 2026 May 20 by Vim project: use correct shellescape() with ! command " For bugs, patches and license go to https://github.com/rust-lang/rust.vim function! rust#Load() @@ -125,7 +126,7 @@ function! s:Run(dict, rustc_args, args) echohl None endif if !v:shell_error - exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)')) + exe '!' . shellescape(exepath,1) . " " . join(map(a:args, 'shellescape(v:val,1)')) endif endfunction