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

Uri path unsafe from string #4580

Merged
merged 3 commits into from Mar 5, 2021
Merged

Uri path unsafe from string #4580

merged 3 commits into from Mar 5, 2021

Conversation

hamnis
Copy link
Contributor

@hamnis hamnis commented Mar 3, 2021

No description provided.

@m-sp m-sp self-requested a review March 3, 2021 15:28
Copy link
Member

@m-sp m-sp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on second thought, can you explain why? it doesn't seems to throw or be in any other ways dangerous

@rossabaker
Copy link
Member

Not every character is valid in a path. Percent encoding is supported, but the spec is not prescriptive about the encoding of the URI. (Something we're handwavy about).

  • If we say this argument is an encoded value, it's not safe.
  • If we say this argument is a decoded value, and we use a complete encoding like UTF-8, I think it is safe.
  • If we say the URI is ISO-8859-1 and try to stuff an emoji in it, it's not safe.

@m-sp
Copy link
Member

m-sp commented Mar 5, 2021

thanks for the explanation :shipit:

@hamnis hamnis merged commit 6f72550 into http4s:series/0.22 Mar 5, 2021
@hamnis hamnis deleted the uri-path-unsafe-from-string branch March 5, 2021 10:03
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

Successfully merging this pull request may close these issues.

None yet

3 participants