-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
content_type validation may be broken for application/x-ole-storage #321
Comments
Hi @kapso, The issue here lies in the fact that your user might upload a file with an "application/vnd.ms-excel" declared content_type, therefore it passes our validation (we validate against the declared content type). But then, when storing the blob, Rails perform something a bit more specific to set the corresponding blob I am considering to do change the way we do things to mimic Rails blob content type assignation, this might be easier for everyone (plus it is a bit more robust than just validating the declared content type). I'll drop a PR in the coming days to solve this. |
…on-may-be-broken-for-applicationx-ole-storage [Validator] Detect attachable content_type like Rails, plus rewind the io after using it (#321)
Will be available in a coming |
thanks a lot, for the quick fix |
@kapso Released is up, let me know if you still have this issue :) |
For the following model, content_type validation fails for -
application/x-ole-storage
So basically a user was able to upload a
.doc
file with content type =application/x-ole-storage
even though this content type is not manifested inCONTENT_TYPES
The text was updated successfully, but these errors were encountered: