Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Content spoofing validation error after upgrade from 3.5 to 4.1 #1479

Closed
SirRawlins opened this issue Mar 7, 2014 · 5 comments
Closed

Content spoofing validation error after upgrade from 3.5 to 4.1 #1479

SirRawlins opened this issue Mar 7, 2014 · 5 comments

Comments

@SirRawlins
Copy link

Hello Guys,

I've this morning tried to upgrade paperclip from 3.5 to 4.1 to gain the security benefits however since upgrading I appear to be getting continual validation errors saying that the content of the files does not match the extension.

I'm defining the content type validation as follows:

validates_attachment_content_type   :file, :content_type => ['text/css']

This works absolutely fine in 3.5 however when trying to upload .css files after the upgrade I'm getting a spoofing error.

Has something changed under the hood in the way in which the mime type is detected?

Thanks,

Robert

@maletor
Copy link

maletor commented Mar 8, 2014

Possibly related to #1470.

@maclover7
Copy link
Contributor

Hi @SirRawlins ! Is this still an issue for you in Paperclip; I know this issue is from approximately 1 year ago. If it is still an issue, would you be willing to send in a PR to solve the problem? Thanks!

@SirRawlins
Copy link
Author

Hi Jon,

I abandoned the upgrade and stayed with the older version. I will try the
upgrade again soon and see if I have anymore luck.

Robert
On 9 Mar 2015 23:03, "Jon Moss" notifications@github.com wrote:

Hi @SirRawlins https://github.com/SirRawlins ! Is this still an issue
for you in Paperclip; I know this issue is from approximately 1 year ago.
If it is still an issue, would you be willing to send in a PR to solve the
problem? Thanks!


Reply to this email directly or view it on GitHub
#1479 (comment)
.

@maclover7
Copy link
Contributor

@jferris @jyurek Please close issue, problem appears to be solved.

@tute
Copy link
Contributor

tute commented May 9, 2015

Will close. Further discussion on this issue should happen #1470 it seems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants