aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/perl.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/perl.vim')
-rw-r--r--runtime/ftplugin/perl.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index d0bdbc0cfb..c63bd3f9c7 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -5,6 +5,8 @@
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)
" Last Change: 2021 Nov 10
+" 2023 Sep 07 by Vim Project (safety check: don't execute perl
+" from current directory)
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -54,7 +56,8 @@ endif
" Set this once, globally.
if !exists("perlpath")
- if executable("perl")
+ " safety check: don't execute perl binary by default
+ if dist#vim#IsSafeExecutable('perl', 'perl')
try
if &shellxquote != '"'
let perlpath = system('perl -e "print join(q/,/,@INC)"')