• Welcome to Simple Machines Community Forum. Please login or sign up.
December 02, 2021, 09:06:13 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


[4825] Firefox 8 beta bug

Started by wattie, October 04, 2011, 10:02:17 AM

Previous topic - Next topic

Kolya

November 10, 2011, 04:08:48 AM #20 Last Edit: November 10, 2011, 04:26:10 AM by Kolya
Since the release of Firefox 8 yesterday all attachments on SMF boards (including this one) download as "index.php". The file being downloaded is the actual attachment, just with a false name and file extension.

Downloads work fine on IE, Chrome, Opera. So this is likely a problem with FF8 not taking the intended mime type.

EDIT: I have successfully downloaded files from other sites (than SMF forums) with FF8, so the problem might lie in the way SMF serves up attachments.

Kolya

November 10, 2011, 04:57:15 AM #21 Last Edit: November 11, 2011, 01:01:00 PM by Kolya
Fix: In Display.php


// Different browsers like different standards...
if ($context['browser']['is_firefox'])
//header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');




EDIT: Updated to use the Opera header which works as well and doesn't produce errors


kat

Some of them, like the tab addons, should be standard.

I'll give that a go, Tom. Is it for all versions of SMF?

Illori

i would assume 2.0.* only as the bug is only reported for 2.0 version

kat

I just took a look at the xml and it seems so.

<install for="2.0 - 2.0.99">

Kolya

I didn't see those threads but I saw and tested the patch mentioned in the second link beforehand and it didn't work here.
Simply sending FF the default content header (as seen above) does work.

Tomcraft

We wrote this little mod just for 2.0.xx as we don't know if the "bug" exists in SMF 1.x.

Resgards, Torsten

Illori

i tested a 1.1.1* install in ff8 and it worked just fine from what i can tell

live627


kat

I've pointed the admins to this topic.

Fingers crossed.

reschke

Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?

reschke

Quote from: K@ on November 08, 2011, 01:12:37 PM
Confirmed.

Firefox is crap. ;)

Right-click>"Save link as" it is, then.

The forum software sends a broken header field, and *only* to Firefox because it attempts user-agent sniffing.

So please don't blame Firefox; if the software would have sent the same header to Chrome or Opera the result would be the same.

The issue has been known for over two months; see Mozilla Bug 685060 for the details.

emanuele

Quote from: reschke on November 12, 2011, 04:41:12 AM
Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?
Because apparently it's not yet fixed (see bug 4825).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

reschke

Quote from: emanuele on November 12, 2011, 05:56:48 AM
Quote from: reschke on November 12, 2011, 04:41:12 AM
Quote from: Illori on October 04, 2011, 10:12:09 AM
this was not included in the 2.0.1 upgrade, so it is expected that it would not be fixed.

Oh my; why wasn't it included?
Because apparently it's not yet fixed (see bug 4825).

I don't know why the bug tracker says it's not fixed when it appears it was.

Come on, this isn't rocket science, right?

Illori

the fix has not been committed to svn so it is not fixed officially

reschke

Quote from: Illori on November 12, 2011, 06:17:05 AM
the fix has not been committed to svn so it is not fixed officially

OK; so can please somebody re-test and then commit it?

It's unfortunate that Firefox get's blamed for something that is somebody else's problem :-)

Illori

when the developers get to it they will test and commit, but even though it is committed that does not guarantee that it will be in the next release.

reschke

Quote from: Illori on November 12, 2011, 06:24:54 AM
when the developers get to it they will test and commit, but even though it is committed that does not guarantee that it will be in the next release.

In which case I recommend that you document the problem in an FAQ or something like that, so that users understand what the problem is and can apply the patch on their own.

Norv

Thank you, reschke!

Will do, no problem.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: