Skip to content

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.

3 participants