Changelog

1.2.1 / 2026-12-04

Bug fixes

All of the issues fixed in this release were originally filed as security reports by an automated system that ignored the security policy. None of these issues are related to security. Each issue’s scope is very narrow: writing one extra file (for each g header), writing truncated (usually zero-byte) files, or aborting processing with an InvalidTarStream exception.

With a tarball containing a 5 byte file one.txt and a 3 byte file two.txt, this is the behaviour for Minitar, GNU tar, and libarchive through macOS tar:

<!– rumdl-disable MD013 –>

| Header Layout | Minitar | GNU tar | libarchive | | β€”β€”β€”β€”β€”β€”β€”β€”β€”- | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” | ——————————————– | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”- | | g, x(size=5) | both files correct | same | same | | g, x(mtime), x(size=5) | both files correct | same | same, with a warning | | g, x(size=5), x(mtime) | one.txt (0 bytes), InvalidTarStream | recovered, β€œSkipping to next header” warning | recovered, β€œDamaged tar archive” warning | | x(mtime), x(size=5) | both files correct | same | same, with a warning | | x(size=5), x(mtime) | one.txt (0 bytes), InvalidTarStream | recovered, β€œSkipping to next header” warning | recovered, β€œDamaged tar archive” warning |

<!– rumdl-enable MD013 –>

For g, x(size=5), x(mtime) and x(size=5), x(mtime), both GNU tar and libarchive recover after reporting one.txt with 0 bytes and report two.txt with 3 bytes as expected.

| Header | Previous | | β€”β€”β€”β€”β€”β€” | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” | | x(size=1e10) | truncated to 1 byte | | x(size=Infinity) | truncated to 0 bytes | | x(size=abc) | truncated to 0 bytes | | x(size=-5) | truncated to 0 bytes, then InvalidTarStream | | x(size=+5) | wrote 5 bytes | | x(size= 5) | wrote 5 bytes | | x(size=5 ) | wrote 5 bytes | | x(size=5.0) | wrote 5 bytes | | x(size=0x10) | truncated to 0 bytes |

Documentation

Adopted a new AI policy document.

1.2.0 / 2026-11-11

Enhancements

Richard Degenne extended Minitar::Reader::EntryStream#read to accept a second parameter, out_string, where the data read from the stream will be read. #166

Documentation

Removed duplicate documentation files and updated the RDoc to match the configuration.

1.1.1 / 2026-11-11

Security

Relative path rejection ignored Windows-like filenames in maliciously crafted tarballs on Windows itself. This affects all versions of Minitar < 1.1.1.

Tar entry names are byte strings following POSIX rules, where / is the only directory separator and characters special on Windows (: and \) are ordinary. This meant that ..\x skipped relative path rejection and affected files or directories outside of the extraction destination.

When running on Windows, Minitar now normalizes all \ characters to / before checking for potential relative path escapes.

The following filename patterns are all rejected with UnsafeFileNameError:

UNC paths are normalized to relative directories in the destination.

Behaviour on non-Windows platform has not been changed.

Bug fix

The .. check now rejects only path components that are exactly ... Names such as dirname../file were previously rejected incorrectly on all platforms.

1.1.0 / 2025-09-07

Enhancements

Bug fix

Resolved #62. The initial solution was developed with the assistance of Claude Sonnet 4 via Kiro, but nearly every line of the solution and tests were rewritten as part of a comprehensive review of all tests.

Breaking change

Removed Minitar::PosixHeader.new_from_stream which should have been removed with 1.0.0 and has been deprecated for a decade or so.

Governance

Changes described below are effective 2024-12-31.

Changes described below are effective 2025-08-04.

1.0.2 / 2024-08-23

Bug fix

Minitar 1.0.1 was released with an unchanged gemspec. Reported by Debashish Biswas in #65.

1.0.1 / 2024-08-08

Bug fix

Resolve a constant lookup issue. The accepted fix has been provided by Aram Price in #58.

1.0.0 / 2024-08-07

Breaking changes

Enhancements

Added Minitar.pack_as_file, originally proposed by John Prince back in 2011 #7.

0.12.1 / 2024-08-21

0.12 / 2024-08-06

0.11 / 2022-12-31

0.10 / 2022-03-26

0.9 / 2019-09-04

0.8 / 2019-01-05

0.7 / 2018-02-19

0.6.1 / 2017-02-07

0.6 / 2017-02-07

Breaking changes

Enhancements

Bugs

Development

0.5.2 / 2008-02-26

0.5.1 / 2004-09-27

0.5.0