runtime(tera): use fnameescape() when loading separate syntax files
Commit:
https://github.com/vim/vim/commit/e551e71d7e47c233d55272162bc3e9160bc9d102
Author: Christian Brabandt <[email protected]>
Date: Tue Mar 31 15:04:48 2026 +0000
runtime(tera): use fnameescape() when loading separate syntax files
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/tera.vim b/runtime/syntax/tera.vim
index 90cf5171e..e151e8674 100644
--- a/runtime/syntax/tera.vim
+++ b/runtime/syntax/tera.vim
@@ -2,6 +2,7 @@
" Language: Tera
" Maintainer: Muntasir Mahmud <[email protected]>
" 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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1w7ao3-00F28Z-VI%40256bit.org.