Bug 8110 - Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
Summary: Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Alexey Proskuryakov
URL: http://www.bcms.gov.uk
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-31 15:10 PST by Pierce Glennie
Modified: 2006-04-08 15:17 PDT (History)
1 user (show)

See Also:


Attachments
add an empty vendorSub (2.73 KB, patch)
2006-04-05 10:40 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierce Glennie 2006-03-31 15:10:08 PST
The BCMS is a crucial service for all UK cattle farmers and therefore if it does not work with a Mac browser it means all UK cattle farmers will need access to a PC. Therefore this is very important.

If you view the page with safari there is no login button (this should take you to "https://www.bcms.gov.uk/bcms/wctd0001.htm" which does seem to work correctly) on the left which prevent it being used at all and the layout of the page is incorrect. This can be contrasted to other browsers, although Firefox's support is not perfect.

I have also emailed BCMS about this issue, and among other things have suggested they contact Apple or the Webkit team about resolving the issue.
Comment 1 Alexey Proskuryakov 2006-04-01 01:09:34 PST
This site detects Safari as a Netscape browser, and looks for the exact version in navigator.vendorSub.substring(0,1). Safari doesn't define this property, which causes all further initialization code to be skipped.

In Firefox 1.5, navigator.vendorSub and navigator.vendor are empty, so it is also mis-detected, but without an exception being raised. See <https://bugzilla.mozilla.org/show_bug.cgi?id=274928> and <http://www.mozilla.org/build/revised-user-agent-strings.html> for more information.

To temporarily work around the problem, you can enable Safari Debug menu and set the user agent to Windows MSIE 6.0. Changing priority/severity to match the rules described at <http://webkit.opendarwin.org/quality/bugpriorities.html>.

var j_appname = navigator.appName;
var j_appvers = navigator.appVersion;
var g_browser = "Other";
var isIE5plus =0;

if (j_appname == "Microsoft Internet Explorer") {g_browser = "ie"}
if (j_appname == "Netscape") {g_browser = "ns"}

if (g_browser == "ie") {
	if(j_appvers.indexOf("MSIE 4") != -1) g_browser += '4';
	if(j_appvers.indexOf("MSIE 5") != -1) g_browser += '5';
	if(j_appvers.indexOf("MSIE 6") != -1) g_browser += '6';
	if(j_appvers.indexOf("MSIE 7") != -1) g_browser += '7';
} else if (g_browser == "ns") {
	if (navigator.vendor == "Firefox") {
		g_browser = "ff";
	}
	g_browser += navigator.vendorSub.substring(0,1);
}
Comment 2 Alexey Proskuryakov 2006-04-05 10:40:42 PDT
Created attachment 7529 [details]
add an empty vendorSub

navigator.vendor: empty in Firefox 1.5, not defined in WinIE. Can be overridden in custom Firefox distributions, and is included in the user agent string then.
navigator.vendorSub: ditto.

This patch doesn't change the value of navigator.vendor (which is "Apple Computer, Inc." in WebKit), although its behavior is so much different from Firefox or earlier Netscape/Mozilla products.
Comment 3 Darin Adler 2006-04-05 10:44:09 PDT
Comment on attachment 7529 [details]
add an empty vendorSub

Looks fine, r=me.
Comment 4 Alexey Proskuryakov 2006-04-05 11:03:12 PDT
Fixed in r13701. This enables the "Please click here to enter" item, but the site still warns about an incompatible browser - its browser detection script needs to be updated to know about Firefox 1.5 and Safari.
Comment 5 Pierce Glennie 2006-04-08 15:17:49 PDT
Seems to work perfectly ow (except that BCMS need to update their website so it does not show Safari as incompatible).

Thanks (by the way I have emailed BCMS about this but they did not seem very resposive - I'll try again and again until they fix it).