Skip to content

Commit 8e091d6

Browse files
author
Reza Jelveh
committed
allow backticks in commands, also fix potential exploit, of user running untrusted code hidden in some source
1 parent 51ee1a3 commit 8e091d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vimux.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function VimuxRunCommand(command, ...)
3838
let l:autoreturn = a:1
3939
endif
4040

41-
let s:_VimTmuxCmd = a:command
41+
let s:_VimTmuxCmd = substitute(a:command, '`', '\\`', 'g')
4242
let s:_VimTmuxCmdAutoreturn = l:autoreturn
4343

4444
if l:autoreturn == 1
@@ -57,7 +57,7 @@ function RunVimTmuxCommand(command, ...)
5757
let l:autoreturn = a:1
5858
endif
5959

60-
let s:_VimTmuxCmd = a:command
60+
let s:_VimTmuxCmd = substitute(a:command, '`', '\\`', 'g')
6161
let s:_VimTmuxCmdAutoreturn = l:autoreturn
6262

6363
if l:autoreturn == 1

0 commit comments

Comments
 (0)