-
Notifications
You must be signed in to change notification settings - Fork 38
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
Multipart_Message.Store_Attachments allows files to be uploaded on the server even is Upload_Directory is disabled (empty String) #376
Comments
…ploaded on the server even is Upload_Directory is disabled (empty String)
@dsauvage : This patch looks wrong to me, I suppose we want the exception only if |
Well it seems I does not understand your rational.
If file uploads are not supported by server, both entry points above should be tackled, and not only the first one. [1] aws-server-http_utils.adb:1238 |
@dsauvage : Well both cases are different. multipart/form-data is used to upload files of MIME-compatible representation, such as pictures and video files, and related metadata a single POST request. multipart/related is used for compound documents and you would need to combine the separate body parts to provide the full meaning of the message. Only the first one is covered by "file upload" in AWS as it is really an explicit file upload. The multipart/related is just a message containing different related parts and at the AWS user's point of view we don't want them to force allowing file upload feature. Hope this clarifies the rational. |
Hope you will reconsider your assessment of this issue. |
I'm not sure what you're expecting. But raising an exception here is wrong as uploading is only a I'm not saying there is no issue and we certainly can improve this, but the patch here is not the way to go. |
Multipart_Message.Store_Attachments
allows files to be uploaded on the server even isUpload_Directory
is disabled (empty String)To fix this issue we applied the same verification and error management as
Multipart_Message.File_Upload
(patch attached).Reproducer file
command.sh
attached, request payload below;In this case, as the
Content-Length
is bigger than the actual payload, the web server is waiting and the temporary uploaded file is not yet deleted. A simplels
command executed in the directory where the web server has been launched will show the temporary file.Another way to assess the temporary uploaded file is by using the
inotifywait
command executed in the directory where the web server has been launchedaws-server-http_utils.adb.changes.patch.txt
command.sh.txt
The text was updated successfully, but these errors were encountered: