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

Fabio decodes URL path parameters #486

Closed
mcneiljt opened this issue Apr 19, 2018 · 6 comments
Closed

Fabio decodes URL path parameters #486

mcneiljt opened this issue Apr 19, 2018 · 6 comments

Comments

@mcneiljt
Copy link

Related issue/change:
#347
cc3e3cd

While using fabio a team mate noticed that some of our URL path parameters, such as resource Ids, which have url-encoded content in them are being decoded by fabio causing 404 errors. The decoded path parameters are sent to the service and not recognized as a valid path.

Example:
container/job with urlprefix-/posts
request: GET /posts/abcder%2Fsdf394/comments

This matches the URL prefix, but routes to /posts/abcder/sdf394/comments which isn't a valid path and thus returns a 404.

valentin-krasontovitsch pushed a commit to valentin-krasontovitsch/fabio that referenced this issue Apr 25, 2018
We enable passing substrings that represent encoded reserved symbols, like
`%2f` for `/`, in the path of a request.

NB: This does not enable using encoded characters in rewrite rules (e.g. in the
urlprefix directive).

Cf. fabiolb#347 and fabiolb#486
@tuempeltaucher
Copy link

Any chance to see a fix here? We have the same problem with https://domain.tld as a path param.

@aaronhurt
Copy link
Member

There is work and discussion going on in #489 ... would you be able to test if that patch fixes your issue?

tuempeltaucher pushed a commit to tuempeltaucher/fabio that referenced this issue Jul 25, 2018
@tuempeltaucher
Copy link

No, that didn't change anything.

[TRACE] abc Tracing xxx/stella/v1/xzy/https://wwwi.screenwork.de/
[...]
[TRACE] abc Routing to service stella on http://10.0.1.4:25853/
"GET /stella/v1/xyz/https%3A%2F%2Fwww.screenwork.de%2F HTTP/1.1" 404 43 "" "curl/7.29.0" http://10.0.1.4:25853/v1/xyz/https://www.screenwork.de/

But I traced it done and added a few "RawPath"s:

tuempeltaucher@a06f985

@aaronhurt
Copy link
Member

@tuempeltaucher that's with the code from #489 applied?

@tuempeltaucher
Copy link

Yes, I forked valentin-krasontovitsch:url_decoding_in_routing, that is the branch from his pull request.

@tuempeltaucher
Copy link

Any news here?

valentin-krasontovitsch pushed a commit to valentin-krasontovitsch/fabio that referenced this issue Feb 2, 2020
We enable passing substrings that represent encoded reserved symbols, like
`%2f` for `/`, in the path of a request.

NB: This does not enable using encoded characters in rewrite rules (e.g. in the
urlprefix directive).

Cf. fabiolb#347 and fabiolb#486
aaronhurt pushed a commit that referenced this issue Feb 2, 2020
We enable passing substrings that represent encoded reserved symbols, like
`%2f` for `/`, in the path of a request.

NB: This does not enable using encoded characters in rewrite rules (e.g. in the
urlprefix directive).

Cf. #347 and #486
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