Skip to content

lambdaisland.uri/uri-str does not URL-encode username and password #53

@devurandom

Description

@devurandom

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"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions