Advertisement:

Author Topic: [4825] Firefox 8 beta bug  (Read 49043 times)

Offline Kolya

  • Full Member
  • ***
  • Posts: 483
  • systemshock.org
Firefox 8: Attachments download as index.php
« Reply #20 on: November 10, 2011, 04:08:48 AM »
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.
« Last Edit: November 10, 2011, 04:26:10 AM by Kolya »

Offline Kolya

  • Full Member
  • ***
  • Posts: 483
  • systemshock.org
Re: Firefox 8: Attachments download as index.php
« Reply #21 on: November 10, 2011, 04:57:15 AM »
Fix: In Display.php

Code: [Select]
// 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
« Last Edit: November 11, 2011, 01:01:00 PM by Kolya »


kat

  • Guest
Re: Downloads in forum not working since Firefox 8.0
« Reply #23 on: November 10, 2011, 05:44:41 AM »
Some of them, like the tab addons, should be standard.

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

Offline Illori

  • Support Specialist
  • SMF Legend
  • *
  • Posts: 52,939
Re: Downloads in forum not working since Firefox 8.0
« Reply #24 on: November 10, 2011, 05:46:59 AM »
i would assume 2.0.* only as the bug is only reported for 2.0 version

kat

  • Guest
Re: Downloads in forum not working since Firefox 8.0
« Reply #25 on: November 10, 2011, 05:49:21 AM »
I just took a look at the xml and it seems so.

<install for="2.0 - 2.0.99">

Offline Kolya

  • Full Member
  • ***
  • Posts: 483
  • systemshock.org
Re: Firefox 8: Attachments download as index.php
« Reply #26 on: November 10, 2011, 06:25:52 AM »
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.

Offline Tomcraft

  • Jr. Member
  • **
  • Posts: 135
Re: Downloads in forum not working since Firefox 8.0
« Reply #27 on: November 10, 2011, 08:35:49 AM »
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

Offline Illori

  • Support Specialist
  • SMF Legend
  • *
  • Posts: 52,939
Re: Downloads in forum not working since Firefox 8.0
« Reply #28 on: November 10, 2011, 08:38:46 AM »
i tested a 1.1.1* install in ff8 and it worked just fine from what i can tell

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,991
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Downloads in forum not working since Firefox 8.0
« Reply #29 on: November 10, 2011, 10:30:11 PM »
Can someone apply the patch here?

kat

  • Guest
Re: Downloads in forum not working since Firefox 8.0
« Reply #30 on: November 11, 2011, 07:03:50 AM »
I've pointed the admins to this topic.

Fingers crossed.

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: Firefox 8 beta bug
« Reply #31 on: November 12, 2011, 04:41:12 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?

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: Downloads in forum not working since Firefox 8.0
« Reply #32 on: November 12, 2011, 04:49:27 AM »
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.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [4825] Firefox 8 beta bug
« Reply #33 on: November 12, 2011, 05:56:48 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.

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: [4825] Firefox 8 beta bug
« Reply #34 on: November 12, 2011, 06:14:00 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?

Offline Illori

  • Support Specialist
  • SMF Legend
  • *
  • Posts: 52,939
Re: [4825] Firefox 8 beta bug
« Reply #35 on: November 12, 2011, 06:17:05 AM »
the fix has not been committed to svn so it is not fixed officially

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: [4825] Firefox 8 beta bug
« Reply #36 on: November 12, 2011, 06:23:38 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 :-)

Offline Illori

  • Support Specialist
  • SMF Legend
  • *
  • Posts: 52,939
Re: [4825] Firefox 8 beta bug
« Reply #37 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.

Offline reschke

  • Semi-Newbie
  • *
  • Posts: 24
Re: [4825] Firefox 8 beta bug
« Reply #38 on: November 12, 2011, 06:27:08 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.

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: [4825] Firefox 8 beta bug
« Reply #39 on: November 12, 2011, 06:28:54 AM »
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