diff options
Diffstat (limited to 'src/testdir')
| -rw-r--r-- | src/testdir/test_plugin_netrw.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_plugin_netrw.vim b/src/testdir/test_plugin_netrw.vim index ced6284197..478908824b 100644 --- a/src/testdir/test_plugin_netrw.vim +++ b/src/testdir/test_plugin_netrw.vim @@ -595,4 +595,12 @@ func Test_netrw_hostname() endfor endfunc +func Test_netrw_FileUrlEdit_pipe_injection() + CheckExecutable id + let fname = 'Xtestfile' + let url = 'file:///tmp/file.md%7C!id>'..fname + sil call netrw#FileUrlEdit(url) + call assert_false(filereadable(fname), 'Command injection via pipe in file URL') +endfunc + " vim:ts=8 sts=2 sw=2 et |
