Skip to content

Commit

Permalink
Relax tar upper bound
Browse files Browse the repository at this point in the history
  • Loading branch information
ffaf1 committed Dec 24, 2023
1 parent 52d1fb6 commit cda1921
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cabal-tests/Cabal-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ test-suite hackage-tests
, clock >=0.8 && <0.9
, optparse-applicative >=0.13.2.0 && <0.19
, stm >=2.4.5.0 && <2.6
, tar >=0.5.0.3 && <0.6
, tar >=0.5.0.3 && <0.7
, tree-diff >=0.1 && <0.4

ghc-options: -Wall -rtsopts -threaded
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ library
process >= 1.2.3.0 && < 1.7,
random >= 1.2 && < 1.3,
stm >= 2.0 && < 2.6,
tar >= 0.5.0.3 && < 0.6,
tar >= 0.5.0.3 && < 0.7,
time >= 1.5.0.1 && < 1.13,
zlib >= 0.5.3 && < 0.7,
hackage-security >= 0.6.2.0 && < 0.7,
Expand Down
8 changes: 6 additions & 2 deletions cabal-install/src/Distribution/Client/Tar.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ extractTarGzFile
-- ^ Tarball
-> IO ()
extractTarGzFile dir expected tar =
Tar.unpack dir
. Tar.checkTarbomb expected
Tar.unpackAndCheck
( \x ->
SomeException <$> Tar.checkEntryTarbomb expected x
<|> SomeException <$> Tar.checkEntrySecurity x
)
dir
. Tar.read
. GZipUtils.maybeDecompress
=<< BS.readFile tar
Expand Down
8 changes: 5 additions & 3 deletions cabal-install/tests/UnitTests/Distribution/Client/Tar.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ module UnitTests.Distribution.Client.Tar
) where

import Codec.Archive.Tar
( Entries (..)
( Entries
, GenEntries (..)
, foldEntries
)
import Codec.Archive.Tar.Entry
( Entry (..)
, EntryContent (..)
( Entry
, GenEntryContent (..)
, entryContent
, simpleEntry
, toTarPath
)
Expand Down

0 comments on commit cda1921

Please sign in to comment.