Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL corruption #24

Open
Lurk opened this issue Jul 12, 2022 · 0 comments
Open

URL corruption #24

Lurk opened this issue Jul 12, 2022 · 0 comments

Comments

@Lurk
Copy link
Owner

Lurk commented Jul 12, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant