Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions