haskell / haskell/cabal

`cabal install` with qualified component leads to `curl` exception

Open
#7,815 4 comments 0 reactions 0 assignees View on GitHub
attention: pr-welcome cabal-install: cmd/install re: error-message regression in 3.4 type: bug type: regression
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

`cabal install` with qualified component leads to `curl` exception:
```
$ cabal install cabal-plan:exe:cabal-plan
Downloading cabal-plan:exe:cabal-plan
Error: cabal: '/usr/local/opt/curl/bin/curl' exited with an error:
curl: (3) URL using bad/illegal format or missing URL
```
Correct error given in 3.2:
```
$ cabal-3.2 install cabal-plan:exe:cabal-plan
cabal-3.2: Invalid package ID: cabal-plan:exe:cabal-plan
```

(I wonder whether this could be exploited: injecting code into the `curl` request. In any case, sanitization seems to be missing.)

Contributor guide

Open the contributing guide

Research direction

Reproduce `cabal install cabal-plan:exe:cabal-plan` and compare its behavior with `cabal-3.2`, which reports an invalid package ID. Trace package-ID validation and the subsequent `curl` request construction; done means the qualified component is rejected safely with a clear error and does not produce a malformed request. Add or update a regression test if the relevant test location can be identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.