]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.2135: tests: tar plugin does not consider 'nowrapscan' v9.1.2135
authorKevin Goodsell <kevin-opensource@omegacrash.net>
Fri, 6 Feb 2026 10:00:13 +0000 (10:00 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 6 Feb 2026 10:08:22 +0000 (10:08 +0000)
commit18d844e365c21043d187f142bc88e75e9966822f
tree966e29c7081ef73962dd4f450d989ece9c248c87
parent56d470a00863234f455fbfba6a96de4f49fe33aa
patch 9.1.2135: tests: tar plugin does not consider 'nowrapscan'

Problem:  search() is used to check for the message from tar that
          indicates leading slashes found in the tar archive, or to
          check for the leading slashes themselves. However, if
          'nowrapscan' is in effect these searches are limited to the
          last line and don't find any results. This causes the warning
          message from tar to be seen in the buffer, the "Path Traversal
          Attack Detected" message to be omitted, and editing actions
          can fail. This can be seen, for example, when editing
          src/testdir/samples/evil.tar.
Solution: Use the 'w' flag for search() (Kevin Goodsell)

closes: #19333

Signed-off-by: Kevin Goodsell <kevin-opensource@omegacrash.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/tar.vim
runtime/doc/version9.txt
src/testdir/test_plugin_tar.vim
src/version.c