Commit Graph

36 Commits

Author SHA1 Message Date
Christian Brabandt a250738303 runtime(tar): use readblob() instead of shelling out to file(1)
fixes: ##16761
closes: #16769

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 22:24:28 +01:00
Christian Brabandt 334a13bff7 patch 9.1.1164: [security]: code execution with tar.vim and special crafted tar files
Problem:  editing a special crafted tar file allows code execution
          (RyotaK, after 129a8446d2)
Solution: escape the filename before feeding it to the `:read` command

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-wfmf-8626-q3r3

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 19:37:29 +01:00
Christian Brabandt 8ac975d97e runtime(tar): fix syntax error in tar.vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 17:13:40 +01:00
Jim Zhou 56957ed410 runtime(misc): add support for bzip3 to tar, vimball and gzip plugins
fixes: #16751
closes: #16755

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 18:06:14 +01:00
Corpulent Robin b69cd52447 runtime(misc): Add support for lz4 to tar & gzip plugin
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin

References:
- https://github.com/lz4/lz4
- https://lz4.org/

closes: #16591

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Corpulent Robin <177767857+corpulentrobin@users.noreply.github.com>
2025-02-06 21:10:49 +01:00
Lennart00 129a8446d2 runtime(tar): Update tar.vim to support permissions
These changes enable tar.vim to keep permissions of files that were
edited intact instead of replacing them with the default permissions.

The major change for this is switching from "tar -OPxf", which reads out
the contents of the selected file from an tar archive to stdout to
"tar -pPxf" which extracts the selected file to the current directory
with permissions intact

This requirs the temporary directory to be created earlier.

closes: #7379

Signed-off-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 22:39:30 +01:00
Christian Brabandt f9ca139e3a runtime(misc): announce adoption of various runtime files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:46:49 +01:00
Christian Brabandt 3a5b3df776 runtime(tar): fix a few problems with the tar plugin
From: #138331:
  - Updating .tar.zst files was broken. Fixes #12639.
  - Extracting files from .tar.zst / .tzs files was also broken and
    works now.
From: #12637:
  - Fixes variable assignment and typo
From: #8109:
  - Rename .tzs to the more standard .tzst

fixes: #12639
fixes: #8105
closes: #8109
closes: #12637
closes: #13831

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-08 20:02:14 +01:00
Christian Brabandt 67abf1592c runtime(tar): comment out strange error condition check
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 17:17:12 +01:00
Christian Brabandt 3d37231437 runtime(tar): improve the error detection
Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.

So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.

The whole if condition seems however slightly dubious.  In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.

There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.

related: #6425
fixes: #13489
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:51:09 +01:00
Bram Moolenaar 6c391a74fe Update runtime files 2021-09-09 21:55:11 +02:00
Bram Moolenaar 23515b4ef7 Update runtime files 2020-11-29 14:36:24 +01:00
Bram Moolenaar 8024f93636 Update runtime files. 2020-01-14 19:29:13 +01:00
Bram Moolenaar 2963456ff2 Update runtime files. 2020-01-09 21:46:04 +01:00
Bram Moolenaar d4a1aabe37 patch 8.1.0352: browsing compressed tar files does not always work
Problem:    Browsing compressed tar files does not always work.
Solution:   Use the "file" command to get the compression type.
2018-09-08 15:10:34 +02:00
Bram Moolenaar 20aac6c112 Update runtime files. 2018-09-02 21:07:30 +02:00
Bram Moolenaar fc65cabb15 Update runtime files. 2018-08-28 22:58:02 +02:00
Bram Moolenaar 3e496b0ea3 Updated runtime files. 2016-09-25 22:11:48 +02:00
Bram Moolenaar ff0341946e Updated runtime files. 2013-04-24 18:51:19 +02:00
Bram Moolenaar 6be7f8733f Update runtime files. 2012-01-20 21:08:56 +01:00
Bram Moolenaar 251e191271 Updated runtime files. 2011-06-19 05:09:16 +02:00
Bram Moolenaar 7fc0c065f0 Runtime file updates. Fix tar plugin window split. 2010-08-10 21:43:35 +02:00
Bram Moolenaar 477db060eb More runtime file updates. 2010-07-28 18:17:41 +02:00
Bram Moolenaar 5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar ed39e1d53c updated for version 7.2-000 2008-08-09 17:55:22 +00:00
Bram Moolenaar e37d50a5de updated for version 7.2c-000 2008-08-06 17:06:04 +00:00
Bram Moolenaar c236c16d08 updated for version 7.2b-000 2008-07-13 17:41:49 +00:00
Bram Moolenaar 8c8de83932 updated for version 7.2a 2008-06-24 22:58:06 +00:00
Bram Moolenaar c81e5e79a0 updated for version 7.1a 2007-05-05 18:24:42 +00:00
Bram Moolenaar d68071d8da updated for version 7.0g01 2006-05-02 22:08:30 +00:00
Bram Moolenaar 910f66f90c updated for version 7.0c10 2006-04-05 20:41:53 +00:00
Bram Moolenaar 1cbe5f739d updated for version 7.0178 2005-12-29 22:51:09 +00:00
Bram Moolenaar bba577a242 updated for version 7.0161 2005-11-28 23:05:55 +00:00
Bram Moolenaar a5792f5890 updated for version 7.0158 2005-11-23 21:25:05 +00:00
Bram Moolenaar ab194816fe updated for version 7.0147 2005-09-14 21:40:12 +00:00
Bram Moolenaar 87e25fdf80 updated for version 7.0117 2005-07-27 21:13:01 +00:00