Hackage accepts .cabal
files with 2 source-repository head
entries
#1259
Labels
.cabal
files with 2 source-repository head
entries
#1259
E.g. this one: https://hackage.haskell.org/package/pipes-zlib-0.4.4.2/pipes-zlib.cabal
When you do
cabal get -s pipes-zlib
you see no error either, it somehow decides on one of these sources.(Likely on the first one, because the second does not exist.)
I can see how this could maybe be exploited, tricking developers to download and run malicious code, by sneaking in an evil
source-repository
stanza that is overlooked. (E.g. by a malicious hackage trustee or co-uploader.)hackage-server
should not rely oncabal check
orsdist
catching this but refute such packages.One wonders how such bugs arise in the first place, likely by violation of the parse don't validate principle.
The text was updated successfully, but these errors were encountered: