Seamonkey and Browser Check Bug
Posted: Wed Jul 25, 2007 7:19 am
Hi,
I am another user of SeaMonkey since the old Mozilla Project found its end and wondered why my browser got rejected in Webmail and SAC.
So i searched thru the javascript code and noticed Seamonkey would get accepted like Mozilla did when its Version would be 1.7+, now that seems easy because Seamonkey is Version 1.8+
But SCALIX has a problem identifying browsers minor version when patch numbers are included. Mine identifies "1.8.1.2pre". SCALIX takes "1" as major and "8.1.2pre" minor but does a numeric compare on minor that must fail due to dots and letters. Therefore I modified the JS to take only the first minor without patch:
This change applies to the files
Since this patch SeaMonkey works for me perfectly.
I am another user of SeaMonkey since the old Mozilla Project found its end and wondered why my browser got rejected in Webmail and SAC.
So i searched thru the javascript code and noticed Seamonkey would get accepted like Mozilla did when its Version would be 1.7+, now that seems easy because Seamonkey is Version 1.8+
But SCALIX has a problem identifying browsers minor version when patch numbers are included. Mine identifies "1.8.1.2pre". SCALIX takes "1" as major and "8.1.2pre" minor but does a numeric compare on minor that must fail due to dots and letters. Therefore I modified the JS to take only the first minor without patch:
Code: Select all
// Return browser's (actual) minor version or -1 if bad version entered
function getMinorVersion(v) {
return getMajorVersion ( (!isEmpty(v) ? (!hasDot(v) ? v.match(/\.(\d*([-\.]\d*)*)/)[1] : 0) : -1) );
}
This change applies to the files
Code: Select all
/var/opt/scalix/st/tomcat/webapps/sac/js/brwsniff.js
/var/opt/scalix/st/tomcat/webapps/webmail/js/2675359740.js
Since this patch SeaMonkey works for me perfectly.