You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File mimetype is now parsed only from the upload request header and then validated after the file is uploaded. We could check the file header as soon the first chunk arrives and abort the upload if the file is not supported
Problems
Files won't be uploaded to the project storage if they are not supported - this should be used for reviewables, not comment attachments.
Proposal
additional callable argument to ProjectStorage.handle_upload, that would accept a sequence of bytes and raise an exception if it does not match a valid signature. handle_upload would call this function as soon, there's enough bytes in the buffer to check the file header, before committing the chunk to the storage.
The text was updated successfully, but these errors were encountered:
Story
File mimetype is now parsed only from the upload request header and then validated after the file is uploaded. We could check the file header as soon the first chunk arrives and abort the upload if the file is not supported
Problems
Files won't be uploaded to the project storage if they are not supported - this should be used for reviewables, not comment attachments.
Proposal
additional callable argument to ProjectStorage.handle_upload, that would accept a sequence of bytes and raise an exception if it does not match a valid signature. handle_upload would call this function as soon, there's enough bytes in the buffer to check the file header, before committing the chunk to the storage.
The text was updated successfully, but these errors were encountered: