1 of 2
1
Mime type problems in 1.6.4
Posted: 29 June 2008 07:28 AM   [ Ignore ]  
Summer Student
Total Posts:  2
Joined  06-23-2008

Hi

I-ve got an error message when a member wants to upload a file (image or jpg)

“The file you are attempting to upload has invalid content for its MIME type.”

While it is perfectly working when logged as superadmin.

The rights access are “green” for members in the download pref.

Any idea were is the problem ?

Thanx.

Hélain Le Blanc.

Profile
 
 
Posted: 29 June 2008 07:31 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Can you check whether xss filtering is applied to images- in ‘Admin- System Prefs- Security’ it’s ‘Apply XSS Filtering to uploaded files?’.

And- does it seem to be all images?  If you try it as superadmin w/one of the failing images, does it work for you?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 29 June 2008 07:40 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  2
Joined  06-23-2008

Hi Robin and woooaa amazing how fast you answer !

Yes i’ve tried to upload the problem image from members in super admin and works perfectly.

But you have found the right solution !!

I had no idea what was this xss security pref… now I know !

And no more problems.

Thank you for your professional reaction.

EE rules !

Profile
 
 
Posted: 29 June 2008 08:00 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Hee- you timed it well, which always helps.

Do keep in mind- turning off the image filter has implications for security.  It means none of the images uploaded are run through the cross site filter- so that means signatures, avatars- pretty much everything.  I personally will only turn it off if the only folks who have access to upload anything are staff.  And even then I prefer to leave it on, just as a check.

So that’s a long way of saying- if you want me to poke more on why those images trip the filter, let me know.  I doubt we can make them not trip it- unless 1.6.4 is being overzealous.  But we might can figure out why they are.

Make sense?  Of if all is well, say the word and I’ll close this one out.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 01 July 2008 04:10 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  880
Joined  12-14-2004

We are having the same issue, Robin. Before upgrade, the appropriate people could upload images with no problem. After 1.6.4, people are getting this mime type error, and I totally don’t want to turn off filtering. I just want it to work like it was in 1.6.3!

 Signature 

Love gadgets, technology, and pop culture? Visit us at Gear Live: http://www.gearlive.com

Profile
 
 
Posted: 02 July 2008 08:45 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

drusoicy- if you login as non-superadmin, it denies the upload- right?  If you flip off the xss filter for images, it loads ok, even as non-superadmin?

Can you email me one of the images that borks it.  I’ll try some tests on my install as well.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 02 July 2008 10:12 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  880
Joined  12-14-2004

Robin,

It looks like the EE email system doesn’t allow attachments, so I will just link you to a couple that my writers asked me to upload for them yesterday:

http://www.gearlive.com/blogimages/cubeart.jpg
http://www.gearlive.com/blogimages/HUVO.jpg

 Signature 

Love gadgets, technology, and pop culture? Visit us at Gear Live: http://www.gearlive.com

Profile
 
 
Posted: 02 July 2008 03:41 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-31-2008

Same problem here Robin, and it only occurred after the upgrade to 1.6.4. It worked for super admins, not for members, and was fixed when I changed the XSS security pref with the same files.

 Signature 

Kevin Smith

hearSAY
http://www.hearsaynashville.com

Profile
 
 
Posted: 02 July 2008 04:04 PM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15502
Joined  05-15-2004

I understand the XSS code has been tightened somewhat in the latest release.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 02 July 2008 04:23 PM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-31-2008

But tightened to the point where normal, authorized users cannot upload files? I suppose I should ask, what is the purpose of the XSS security measure in the first place?

 Signature 

Kevin Smith

hearSAY
http://www.hearsaynashville.com

Profile
 
 
Posted: 03 July 2008 09:06 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23547
Joined  05-20-2002

Yep- behavior does seem to have changed.  The crew is in taking a look at things- we’ll update when we hear back on what’s up.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 03 July 2008 02:39 PM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15502
Joined  05-15-2004

As Robin said, we’re currently looking into the issue. We’ll let you know when we have a fix.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 08 July 2008 01:15 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  880
Joined  12-14-2004

I know you said you’d update when there was a fix, but I just figured I’d throw in a nudge and ask for a status update. This issue is slowing down our publishing time, which in the long run, hurts the bottom line a bit wink

 Signature 

Love gadgets, technology, and pop culture? Visit us at Gear Live: http://www.gearlive.com

Profile
 
 
Posted: 08 July 2008 02:27 PM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002

Some false-matches on the files can be alleviated, and indeed internally I have that fix ready for the next build.  The issue at hand, though, is how much leniency can safely be given.  If it helps you have some perspective, the characters tripping it up are patterns such as:

<a blahblahblah >

And I think it’s safe to say that if you have selected that file uploads be sanitized against XSS attacks, that finding what appears to be a link inside one is suspect.  The problem is that certain browsers ::cough:: IE6 ::cough:: when they perceive HTML tags within an image, will just serve that image’s “contents” as HTML, ignoring the MIME type that the server sends.

So we’re taking an extremely cautious stance before adding further leniency.

 Signature 
Profile
MSG
 
 
Posted: 22 July 2008 03:28 PM   [ Ignore ]   [ # 14 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  03-07-2008

This one triggered the “wrong MIME type” response, too:

http://idioom.eu/images/uploads/souvenirs/black_sand.jpg

*edit* a bit more info: After turning off XSS filtering I was able to upload the image as a non logged in user of the site. Now I am worried about security implications…

Profile
 
 
Posted: 22 July 2008 03:47 PM   [ Ignore ]   [ # 15 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1660
Joined  06-01-2007

I had this very same problem with my forums. And it came out that with certain imagehandling softwares when saving the file, it makes some “bad” 101010’s to file what keeps them be “against” the rules of XSS with EE.

If i remember right, one sofware in my case was photoshop elements and when saving as. I dont remember anymore was it cleared when people saved their files “for web”. But this was/is known issue for me too, or should i say, to my forum users!

Cheers:
- Tuittu

 Signature 

Using EE Commercial 1.6.6 Build 20081114  | EE forum 2.1.1 Build 20081028 | EE MSM 1.1 Build: 20081024

Profile
 
 
Posted: 22 July 2008 03:49 PM   [ Ignore ]   [ # 16 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15502
Joined  05-15-2004

Be sure to use the very latest version of the forum. There were some updates in that area.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 22 July 2008 03:53 PM   [ Ignore ]   [ # 17 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1660
Joined  06-01-2007

Ingmar you replied to me? You mean there were updates for “better handling”? I updated my forums some days ago! As you can always see what versions or builds i run with, from my sig.

 Signature 

Using EE Commercial 1.6.6 Build 20081114  | EE forum 2.1.1 Build 20081028 | EE MSM 1.1 Build: 20081024

Profile
 
 
Posted: 22 July 2008 03:57 PM   [ Ignore ]   [ # 18 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15869
Joined  06-03-2002
docflo - 22 July 2008 03:28 PM

This one triggered the “wrong MIME type” response, too:

http://idioom.eu/images/uploads/souvenirs/black_sand.jpg

*edit* a bit more info: After turning off XSS filtering I was able to upload the image as a non logged in user of the site. Now I am worried about security implications…

What build are you running docflo?  Examining that file in a text editor, nothing jumps forward as setting off a false positive in the latest filter.

 Signature 
Profile
MSG
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65096 Total Logged-in Users: 56
Total Topics: 82243 Total Anonymous Users: 39
Total Replies: 442010 Total Guests: 290
Total Posts: 524253    
Members ( View Memberlist )