Skip to content

Paths params that are parsed from the incoming req.url, do not apply URI decoding to extracted values - #166

Open
Sam152 wants to merge 2 commits into
mcampa:masterfrom
Sam152:url-encoding-in-segment
Open

Paths params that are parsed from the incoming req.url, do not apply URI decoding to extracted values#166
Sam152 wants to merge 2 commits into
mcampa:masterfrom
Sam152:url-encoding-in-segment

Conversation

@Sam152

@Sam152 Sam152 commented Jun 2, 2026

Copy link
Copy Markdown

The flow as I understand it is:

  • We generate a regex for each of our paths with patterns for the {params}
  • We match the incoming path against the regex and use that to get the corresponding procedure
  • We exec the regex to extract the params

What I found in our test suite is, our clients would correctly be URL encoding params, but these were being passed down in their raw form. From the test case:

Screenshot 2026-06-02 at 3 03 11鈥痯m

If the params were natively bound in express, they would have been decoded before being passed down into the rest of the stack.

We can apply this same transformation in our own path processing.

@Sam152 Sam152 changed the title Fix bug in URL encoded param components being passed down into procedures Paths params that are parsed from the incoming req.url, do not apply URI decoding to extracted values Jun 2, 2026
@Sam152
Sam152 marked this pull request as ready for review June 2, 2026 07:05
@Sam152

Sam152 commented Jun 30, 2026

Copy link
Copy Markdown
Author

Hey @mcampa, any chance you're able to take a look at this? If you're interested in some kind of co-maintainership, I'd also be happy to help.

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.

1 participant