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

bug: parameter in path matching fails on percent encoding in the URI #148

Open
Gary-Airwallex opened this issue Jul 24, 2024 · 2 comments
Open

Comments

@Gary-Airwallex
Copy link

When APISIX calls dispatch it sends Nginx normalized URI which decodes percent encoded characters, i.e. /uri%20contains%20space would become /uri contains space. The matching behavior of radixtree should be aware of this decoding. Steps to reproduce

  1. Create a new matching rule with a parameter in path
{
    paths = { "/test/:id/update" },
    methods = { "GET" },
}
  1. Match the rule with an URI that contains space, e.g. /test/contains space/update
  2. The URI is expected to match the parameter :id but it does not.
@xpicio
Copy link

xpicio commented Sep 18, 2024

Hello, the same issue occurs when the encoded character is the /, for example /machines/rando-id/messages/machine%2F01%2Ffeed-rate with the route path /machines/:id/channels/:channel is not work as expected.

@lcaiffa
Copy link

lcaiffa commented Oct 2, 2024

I have also gone crazy on the subject! It would be very important to correct this behavior!

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

3 participants