Open Yaytay opened 6 years ago
Hi @Yaytay,
I'm not able to reproduce with 1.17.0.
Can you have a try with this version and if you are able to reproduce, please share the log and an export of your API definition.
Cheers!
Hi @brasseld Do you have a release date for 1.17.0? Jim
We expect the release for today.
Can you give me the target URI you specify in the dynamic routing policy. I think I'm not able to reproduce because I4m not using the same target.
Thanks a lot.
The policy config is:
{
"pattern": "/option/file/(.*)/(.*)/(.*)",
"url": "{#endpoints['default']}/fileUpload/{#group[0]}/{#group[1]}/{#group[2]}"
},
and the endpoints look like this (on the test system there is only one endpoint):
"endpoints": [
{
"name": "default",
"target": "http://internal.host.name:8080/ServiceName/path1/path2/path3",
"weight": 1,
"backup": false,
"type": "HTTP",
"http": {
"connectTimeout": 5000,
"idleTimeout": 60000,
"keepAlive": true,
"readTimeout": 10000,
"pipelining": false,
"maxConcurrentConnections": 100,
"useCompression": true,
"followRedirects": false
}
}
],
Expected Behavior
A request of the form: POST /test/option/file/e1fae1a7-64dc-4a5d-ab48-823c191e80ae/12376-6167-1-6-1-1-1/!%C2%A3%24%25%5E%26().docx should work.
Current Behavior
Possible Solution
I'm not sure when it's happening, but clearly something is %-decoding the path and the Dynamic Routing Policy seems to be causing it to double-decode. For most things like this Dynamic Route it will be necessary to keep the path %-encoded all the way through Gravitee. It is never possible to %-decode a path and keep it as a single string (because a %2F will change the meaning of the path).
Steps to Reproduce (for bugs)
Context
We have to accept filenames specified by end users, and those nasty people can put anything in. We need to ensure that anything that is correctly encoded can make it through Gravitee.
Your Environment