Skip to content

URL corruption #24

@Lurk

Description

@Lurk

Description:

Clink “corrupts” URL if the query part contains a character from the unwise set of characters. By corrupts, I mean percent encodes characters like “[“ or “]”. This is fine if you live in a world where all URLs obey https://url.spec.whatwg.org/, but I see URLs like https://foo.foo/?param[]=1&param[]=2 in the wild.

The problem is if you have clink in the background and copied URL like that you will get https://foo.foo/?param%5B%5D=1&param%5B%5D=2 which is a bug from the user point of view.

Why?

Clink internally uses url crate for URL manipulation. It percent encodes keys and values when you append pair to a query without the possibility to opt out.

What to do?

  1. find an alternative to url crate
  2. make a pull request with opt-out (highly unlikely it will be accepted because the crate follows the spec)
  3. fork and use that fork (i do not like the idea of supporting that kind of fork)
  4. let’s say it is a feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions