Closed Bug 577865 Opened 15 years ago Closed 15 years ago

Catch broken user agents when sniffing browser version

Categories

(addons.mozilla.org Graveyard :: Public Pages, enhancement, P5)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: davemgarrett, Unassigned)

Details

Attachments

(1 file)

Problem: User (possibly unknowingly) installs some junk addon that has an ego and feels the need to announce itself in their user agent string, but does so poorly and breaks future updates to the UA. The user is perpetually stuck with a browser identifying itself as an old version even after many successive updates. Sites ranging from YouTube to AMO get confused, in the case here of telling the user an addon they wish to install is incompatible when it's not. (see bug 546861, bug 576238, bug 577823) Suggestion: When sniffing the user agent for AMO to state what is or is not compatible, check both the browser version and the Gecko version. If the result is an invalid pair, such as Gecko 1.9.2.x with Firefox 3.0.x, then show a message to the user once with a link pointing them to SUMO with instructions on how to fix their problem. I'm not suggesting that the detection try to work around the broken UA, just that when it's possible to know for sure it's broken then the user should be informed so it can be fixed and prevent user confusion when things break as a result. http://support.mozilla.com/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
That's an interesting idea. Is there a list of version pairs that are [in]valid?
Valid versions for Gecko with Firefox and SeaMonkey: Gecko Firefox SeaMonkey 2.0* 4.0* 2.1* 1.9.3* 3.7* 2.1* 1.9.2* 3.6* n/a 1.9.1* 3.5* 2.0* 1.9.0* 3.0* n/a 1.8.1* 2.0* 1.1* 1.8.0* 1.5* 1.0* I don't know what Gecko versions are for Fennec but I don't think this is a problem on mobile. Note that in the instance where the UA is partially overridden leading to the miss-matched Gecko/browser versions in the UA this should be easy to detect just from the UA. (e.g. the 3 bugs I referenced) If the entire UA is overridden via general.useragent.override some other method would be needed to get the Gecko version. The full override is a possibility from user intended overrides that they did on purpose but possibly forgot and left in place after they forced things to work for whatever site they needed to spoof for. (e.g. pretended to be on Windows because a site demanded Win or Mac for no real reason) See also bug 566434 for an additional tactic which has been suggested on the application side which would really help with this and other UA problems.
Here's a quick little function to dynamically detect the Gecko major version by DOM instead of UA to avoid the full override problem noted in comment 2. (tested in Firefox 3 through 4 and Konqueror) Turned out to be really simple thanks to the "New in ___" tags on the MDC page for DOM elements.
CCing chowse for ideas on how to expose this without confusing anyone.
chowse -- this isn't a design priority.
Priority: -- → P5
Target Milestone: --- → Future
Bug 581008 and related may make this largely unnecessary for Firefox 4 users.
I'm going to WONTFIX my idea. Firefox 4+ should be largely immune to the UA junk this bug was filed to deal with. Once it's out and the user-base updates, any fancier detection will be overkill.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: