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

test: validate missing encoding in to_string #606

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Mar 7, 2024

Validates cloudflare/workerd#1777 bug.

@anonrig anonrig requested a review from jasnell March 7, 2024 17:58
@anonrig
Copy link
Member Author

anonrig commented Mar 7, 2024

We might have a bug with character sets.

  • The application/x-www-form-urlencoded percent-encode set is the component percent-encode set and U+0021 (!), U+0027 (') to U+0029 RIGHT PARENTHESIS, inclusive, and U+007E (~).
  • The component percent-encode set is the userinfo percent-encode set and U+0024 ($) to U+0026 (&), inclusive, U+002B (+), and U+002C (,).
  • The userinfo percent-encode set is the path percent-encode set and U+002F (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([) to U+005E (^), inclusive, and U+007C (|).

The user info percent-encode set contains /, but it doesn't get encoded.

cc @lemire

@anonrig anonrig requested a review from lemire March 7, 2024 18:07
@anonrig anonrig merged commit a460fcd into main Mar 7, 2024
35 checks passed
@anonrig anonrig deleted the fix-search-params-encoding branch March 7, 2024 18:19
@lemire
Copy link
Member

lemire commented Mar 8, 2024

@anonrig Nice fix. :-)

I like that you added a test.

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