This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
do_not_validate_attachment_file_type still validating #2195
Comments
i've just discovered that for |
matthewford
added a commit
to matthewford/mastodon
that referenced
this issue
Dec 10, 2022
Specs were failing due to paperclips' do_not_validate_attachment_file_type option not working properly thoughtbot/paperclip#2195 Paperclip: validate_media_type: false also broke the specs as it still expects a filename validation. So adding in a validation to appease paperclips requirements.
tenderlove
pushed a commit
to tenderlove/mastodon
that referenced
this issue
Jan 4, 2023
Specs were failing due to paperclips' do_not_validate_attachment_file_type option not working properly thoughtbot/paperclip#2195 Paperclip: validate_media_type: false also broke the specs as it still expects a filename validation. So adding in a validation to appease paperclips requirements.
jordemort
pushed a commit
to jordemort/mastodon
that referenced
this issue
Jan 20, 2023
Specs were failing due to paperclips' do_not_validate_attachment_file_type option not working properly thoughtbot/paperclip#2195 Paperclip: validate_media_type: false also broke the specs as it still expects a filename validation. So adding in a validation to appease paperclips requirements.
inductor
pushed a commit
to inductor/mastodon
that referenced
this issue
Jan 31, 2023
Specs were failing due to paperclips' do_not_validate_attachment_file_type option not working properly thoughtbot/paperclip#2195 Paperclip: validate_media_type: false also broke the specs as it still expects a filename validation. So adding in a validation to appease paperclips requirements.
tenderlove
pushed a commit
to tenderlove/mastodon
that referenced
this issue
Feb 13, 2023
Specs were failing due to paperclips' do_not_validate_attachment_file_type option not working properly thoughtbot/paperclip#2195 Paperclip: validate_media_type: false also broke the specs as it still expects a filename validation. So adding in a validation to appease paperclips requirements.
Adding
Is not a great idea because it's going to allow all of your attachments to possess any media type (e.g. sketchy.exe will be allowed). It's better to add |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I have Ubuntu 14.0.4 64 with rails 4.26 and paperclip 4.3.6.
I have a model called track in track.rb with a
do_not_validate_attachment_file_type
validation:According to the docs it shouldn't do any validations but when I load a gps file i get the error
[paperclip] Content Type Spoof: Filename demofile.foo (text/xml from Headers, [] from Extension), content type discovered from file command: application/xml. See documentation to allow this combination.
The only way to bypass the validation is with an initialier in
config/initializer/paperclip.rb
with:Paperclip.options[:content_type_mappings] = { :gpx => ["application/xml"] }
Souldn't
do_not_validate_attachment_file_type
stop all validations?The text was updated successfully, but these errors were encountered: