]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(tera): use fnameescape() when loading separate syntax files
authorChristian Brabandt <cb@256bit.org>
Tue, 31 Mar 2026 15:04:48 +0000 (15:04 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 31 Mar 2026 15:04:48 +0000 (15:04 +0000)
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/tera.vim

index 90cf5171eb3aa53e14a880745271b9184416af2d..e151e8674b7ec4fe2273e2ae60a3f14b0672a174 100644 (file)
@@ -2,6 +2,7 @@
 " Language:    Tera
 " Maintainer:  Muntasir Mahmud <muntasir.joypurhat@gmail.com>
 " Last Change: 2026 Jan 29
+" 2026 Mar 31 by Vim project: prevent code execution in filename
 
 if exists("b:current_syntax")
   finish
@@ -22,7 +23,7 @@ endif
 
 " Load the underlying language syntax if detected
 if s:underlying_filetype != ""
-  execute "runtime! syntax/" . s:underlying_filetype . ".vim"
+  execute "runtime! syntax/" . fnameescape(s:underlying_filetype) . ".vim"
   unlet! b:current_syntax
 else
   " Default to HTML if no specific language detected