-
Notifications
You must be signed in to change notification settings - Fork 155
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
Image with $ sign in the name is broken in Enketo #438
Comments
When I click on download icon on submission table, backend receives this request: /v1/projects/473/forms/build_media_1556624635/submissions/uuid%3Abe2af264-615d-4658-afa5-385158ede558/attachments/%24dollar-8_45_1.jpg However, URL in Enketo is /-/media/get/1/uuid:be2af264-615d-4658-afa5-385158ede558/%24dollar-8_45_1.jpg and it is not sending any request to backend. |
I initially thought it was Enketo's issue and create this PR.. However, it is nginx which is decoding %24 into $. Experiments:With following config, backend receives $ instead of %24
If I remove /- from the proxy_pass then %24 is not decoded into $ the solution I came up with is
however, I don’t know the security implications of this. I had opened an issue in Nginx issue tracker https://trac.nginx.org/nginx/ticket/2506. They say it is by design |
I'm pretty sure that Backend should be able to handle either $ or %24. Frontend calls
If Enketo isn't sending a request at all, that still sounds like an Enketo issue to me. Do you happen to have a repro on a server handy? Are any requests to the Enketo server failing? |
…ncodes path which breaks submission attachment with special characters in webform more details: https://trac.nginx.org/nginx/ticket/2506
Related to #433
If image contains $ sign in the name then Enketo doesn't preview it.
The text was updated successfully, but these errors were encountered: