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

URL decoding of parameters must be done after the parsing #601

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

LeSuisse
Copy link

Otherwise percent-encoded / are recognized as an URL separator
which does not respect the section 2.4 of the RFC3986 [0].
This is an issue if you have an string URL parameter with a /
character since the URL is decoded before the finding the route
corresponding the request you will either not find the route
or find a route that does not match with the request. The URL
must be decoded only when setting the parameters.

[0] https://tools.ietf.org/html/rfc3986#section-2.4

When a URI is dereferenced, the components and subcomponents
significant to the scheme-specific dereferencing process (if any)
must be parsed and separated before the percent-encoded octets within
those components can be safely decoded, as otherwise the data may be
mistaken for component delimiters.

Otherwise percent-encoded / are recognized as an URL separator
which does not respect the section 2.4 of the RFC3986 [0].
This is an issue if you have an string URL parameter with a /
character since the URL is decoded before the finding the route
corresponding the request you will either not find the route
or find a route that does not match with the request. The URL
must be decoded only when setting the parameters.

[0] https://tools.ietf.org/html/rfc3986#section-2.4
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