Firefox 8 User Agent String "Ubuntu;" addition causes attempt to download rather than display

Bug #897794 reported by Kiall Mac Innes
110
This bug affects 18 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The patch added by Chris Coulson in the FF 8 packages to add "Ubutnu;" to FireFox's User Agent string has caused some sites to start offering a download of a "application/vnd.wap.xhtml+xml" or similar file.

This change seems to have caused an issue with 51degrees.com's .NET Mobile Framework. Visiting a site that uses the framework now prompts to download an "application/vnd.wap.xhtml+xml" file.

Obviously, this is likely the fault of the framework, and not Ubuntu. But I felt it should be logged, and I could not find any launchpad bug regarding this change.

debian/patches/ubuntu-ua-string-changes.patch
> Description: Add "Ubuntu" to the platform part of the UA string
> Author: Chris Coulson <email address hidden>

The User Agent changed from:

> Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

to

> Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0

Revision history for this message
Kiall Mac Innes (kiall) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Micah Gersten (micahg) wrote :

I discovered that moving Ubuntu in the UA string will solve this issue at least on the site reported in the duplicate:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:9.0) Gecko/20100101 Firefox/9.0

Revision history for this message
Micah Gersten (micahg) wrote :

Sorry, I meant workaround, not solve in the last comment. This is due to bad parsing of the user agent string and can only really be fixed server side.

Revision history for this message
Jared (jared-vanvolkenburg) wrote :

With the site http://www.folgers.com/index.aspx?utm_source=welcome_email&utm_medium=email&utm_campaign=wakinupclub&cid=em_wuc_subscribethankyou

I get a dialog with the message:

You have chosen to open
index.aspx
which is a: aspx File (19.4 KB)
from http://www.folgers.com

What should Firefox do with this file?

It does not indicate the mime type indicated in this bug. So I am not sure if it is the same bug or a separate bug.

Build identifier: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0
Build platform
target
i686-pc-linux-gnu

Ubuntu Release 11.10 (oneric)
Kernel Linux 3.0.0-14-generic
Gnome 3.2.1
Unity: 4.24.0-0ubuntu2b1

Kiall Mac Innes (kiall)
summary: - Firefox 8 User Agent String "Ubuntu;" addition causes
- "application/vnd.wap.xhtml+xml" download
+ Firefox 8 User Agent String "Ubuntu;" addition causes attempt to
+ download rather than display
description: updated
Revision history for this message
Jared (jared-vanvolkenburg) wrote :

According to Question #179908 #13 the problem exists in Firefox 9 beta as well, although no detailed information is provided.

Revision history for this message
Jared (jared-vanvolkenburg) wrote :
Revision history for this message
Doug Morse (dm-dougmorse) wrote :

I am also having several sites prompting me to download a "application/vnd.wap.xhtml+xml" file for various websites.

I also encountered one case in which the page simply renders the page as raw HTML instead of actually rending the page/frames correctly.

This behavior is new, and I believe coincides with having upgraded to FF8 (official Ubuntu/Canonical version).

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

I can confirm that, as a workaround, if you install the User Agent Switcher:

https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

and simply create a new user agent -- I called mine "Firefox 8.0" -- and edit out the "Ubuntu; " (notice that the space after the semicolon is removed), that this temporarily fixes the "vnd.wap.xhtml+xml" problem, at least for the 4-5 sites I checked.

Note that the User Agent Switcher, when you create a new entry, prompts you with the default user agent string of your version of Firefox. Thus, this is really easy to do -- you do not have to create an entirely new user agent string, simply edit the default as I described.

Just for clarity, you (obviously) must switch your user agent to your new agent using Tools -> Default User Agent. Once you change it, the menu also changes (which I think is confusing at first), so in my case the Tools menu changes to Tools -> Firefox 8.0.

This did not fix the problem I'm having with one website rendering raw HTML -- the web interface for a D-Link DGS-1210-24 managed switch -- and I have tried using several other user agent strings (i.e., IE6, IE7, etc.) to no avail. So, I suspect this particular problem of mine is related to other changes within FF8 not having to do with the user agent string.

I have attached a screenshot of the relevant settings in my User Agent Switcher.

Revision history for this message
Micah Gersten (micahg) wrote :

@Doug Morse
Please file a separate bug for the raw HTML issue.

Revision history for this message
Shafik Mahomad (smahomad) wrote :

FWIW http://www.bes.pt -> is another website that shows the issue. High profile banking site in Portugal.

Revision history for this message
Shafik Mahomad (smahomad) wrote :

The work-around for the issue as reported in #3 is not available for FF 8.0 users since the mentioned extension (User Agent Switcher) is not compatible with FF 8.0 and cannot be installed.

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

@Sharif: Did you try to download the plugin directly from the website I mentioned in comment #9? I'm on Ubuntu 11.10 with the very latest official of Firefox (FF 8.0) from Ubuntu and the plugin works just fine for me. See the attached screenshots. Of course, the "Ubuntu; " part of the user agent string is not there, because I'm using user agent to remove it. :) It may be the website has a later version than is available from within FF itself, or perhaps there's something different about the Portuguese version of FF. Hope this helps.

Revision history for this message
Aleksiy (aleksiyi) wrote :

Today I just go to the same troubled site and it is opened whitout problems.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firefox - 10.0~b3+build2-0ubuntu1

---------------
firefox (10.0~b3+build2-0ubuntu1) precise; urgency=low

  * New upstream release from the beta channel (FIREFOX_10_0b3_BUILD2)

  * "Fix" LP: #897794 - some websites expect "X11" to be the first token of
    the platform component in the UA string
    - update debian/patches/ubuntu-ua-string-changes.patch
  * Defuzz ubuntu-codes-google.patch
 -- Chris Coulson <email address hidden> Thu, 05 Jan 2012 16:43:28 +0000

Changed in firefox (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I've also uploaded this change to the beta PPA for people not running Precise (although it won't be built and published until tomorrow).

Anyone is free to test it once it's built (of course, we would gladly welcome extra, more permanent beta testers - see http://www.chriscoulson.me.uk/blog/?p=19 for ways to help)

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Did anybody try the beta?

Revision history for this message
amadenri (amadenri) wrote : Re: [Bug 897794] Re: Firefox 8 User Agent String "Ubuntu; " addition causes attempt to download rather than display

Sorry but i'm not sure if i'm doing it!
Synaptic says i've installed:
firefox_10.0~b3+build2-0ubuntu0.11.10.1~mfn1, Firefox says: 10.0,
Mozilla Firefox for Ubuntu canonical - 1.0 and it works fine.
My repositories are:
http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu
and: http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu

I tried to install: firefox_10.0~b3+build2-0ubuntu1_i386.deb but it
would not install, i had problems with libglib2, eog, ubuntu-desktop, i
had to uninstall the last two and in the it worked untill i turned off
and on again my pc, nothing worked anymore i had only the desktop, no
menu etc.; in the end i could open synaptic and managed to set
everything right.

Il 11/01/2012 10:25, Chris Coulson ha scritto:
> Did anybody try the beta?
>

Revision history for this message
Augustine Souza (aesouza2008) wrote :

Yes, I'm on the beta now and having Ubuntu *after* X11 solves the issue of being offered a "mobile.aspx" download instead of opening the page on http://www.property24.com/.

Revision history for this message
caberg (caberg-408) wrote :

Please path this for firefox9 now !

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

We're not going to make any changes to the current version when 10.0 is released in a little over a week

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.