Skip to content
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

SAW - Plain text document upload bug #2170

Merged
merged 2 commits into from Jan 24, 2020
Merged

Conversation

SamWord
Copy link
Contributor

@SamWord SamWord commented Jan 17, 2020

#170650880

There was no issue with uploading actual plain text files. This was an issue of just changing the extension of a rich text file from .rtf to .txt. Since renaming the extension does not actually convert the file format, Paperclip was (correctly) determining that the file was spoofed. Paperclip assigned a vague "Invalid file type" message to files that were spoofed. A custom error message was added to make it clear that the file type does not match the file's contents.

Additionally, from my own testing, Paperclip seems to have a bug that determines all rich text files are spoofed, preventing the user from uploading rich text files. This should be fixed when we upgrade to using ActiveStorage #169848801. For now, .rtf files were removed from the list of supported files.

@Stuart-Johnson Stuart-Johnson merged commit bc6083b into v3.7.0 Jan 24, 2020
@Stuart-Johnson Stuart-Johnson deleted the saw-txt-upload-bug branch January 24, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants