lambdaisland / lambdaisland/uri
`lambdaisland.uri/uri-str` does not URL-encode username and password
Open
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 257
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
lambdaisland.uri/uri-str does not URL-encode username and password:
(->URI "http" "fan:cy" "s@cr3d!" "example.com" nil nil nil nil)
;=> #lambdaisland/uri"http://fan:cy:s@cr3d!@example.com"
I would expect lambdaisland.uri/URI it to be able to round-trip its input data, but it can't:
(->> (map->URI {:scheme "http"
:user "fan:cy"
:password "s@cr3d!"
:host "example.com"})
uri-str
uri
(select-keys [:scheme :user :password :host]))
;=>
;{:scheme "http",
; :user "fan",
; :password "cy:s@cr3d!",
; :host "example.com"}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ->URI, map->URI, uri-str, and uri examples in the issue and reproduce the incorrect round trip with the supplied username and password. Trace how these functions serialize and parse user information, then verify that the same values survive a uri-str round trip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100