tar 0.5.0.2 → 0.5.0.3
raw patch · 3 files changed
+15/−1 lines, 3 files
Files
- Codec/Archive/Tar/Check.hs +9/−0
- changelog.md +5/−0
- tar.cabal +1/−1
Codec/Archive/Tar/Check.hs view
@@ -120,6 +120,15 @@ checkTarbomb expectedTopDir = checkEntries (checkEntryTarbomb expectedTopDir) checkEntryTarbomb :: FilePath -> Entry -> Maybe TarBombError+checkEntryTarbomb _ entry | nonFilesystemEntry = Nothing+ where+ -- Ignore some special entries we will not unpack anyway+ nonFilesystemEntry =+ case entryContent entry of+ OtherEntryType 'g' _ _ -> True --PAX global header+ OtherEntryType 'x' _ _ -> True --PAX individual header+ _ -> False+ checkEntryTarbomb expectedTopDir entry = case FilePath.Native.splitDirectories (entryPath entry) of (topDir:_) | topDir == expectedTopDir -> Nothing
changelog.md view
@@ -1,3 +1,8 @@+0.5.0.3 Duncan Coutts <duncan@community.haskell.org> May 2016++ * Fix tarbomb logic to ignore special PAX entries. Was breaking many+ valid tarballs. https://github.com/haskell/cabal/issues/3390+ 0.5.0.2 Duncan Coutts <duncan@community.haskell.org> April 2016 * Fix compatability when using ghc-7.4.x and directory >= 1.2.3
tar.cabal view
@@ -1,5 +1,5 @@ name: tar-version: 0.5.0.2+version: 0.5.0.3 license: BSD3 license-file: LICENSE author: Duncan Coutts <duncan@community.haskell.org>