Project

General

Profile

Actions

Bug #14136

closed

MSIE detected as Mozilla browser

Added by Pieter over 20 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2004-05-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

MSIE sends as browser detection string: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1). Typo3 detects the word Mozilla first and ignores the MSIE part.

Browser identification strings:

Mozilla 1.6: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Internet Explorer 6: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Opera can report itself as Opera OR IE6 OR Mozilla 5.0 OR Mozilla 4.78 OR Mozilla 3.0:
As Opera: Opera/7.23 (Windows NT 5.1; U) [en]
As IE6: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23
As Mozilla 5.0: Mozilla/5.0 (Windows NT 5.1; U) Opera 7.23 [en]
As Mozilla 4.78: Mozilla/4.78 (Windows NT 5.1; U) Opera 7.23 [en]
As Mozilla 3.0: Mozilla/3.0 (Windows NT 5.1; U) Opera 7.23 [en]

The string 'Mozilla' is present in several browsers (MSIE, Opera, ...?). The detection of 'Mozilla' should be one of the last lines because of this.
Detection of MSIE should have priority over Opera (because the words 'MSIE' and 'Opera' are both present in the Opera string if Opera presents itself as IE6)

If you keep the 2 rules above in mind, the browser detection should contain (the file /t3lib/class.t3lib_matchcondition.php at line 414):

if (strstr($useragent,'MSIE'))  {
$browserInfo['browser']='msie';
} elseif(strstr($useragent,'Opera')) {
$browserInfo['browser']='opera';
} elseif(strstr($useragent,'Lynx')) {
$browserInfo['browser']='lynx';
} elseif(strstr($useragent,'PHP')) {
$browserInfo['browser']='php';
} elseif(strstr($useragent,'AvantGo')) {
$browserInfo['browser']='avantgo';
} elseif(strstr($useragent,'WebCapture')) {
$browserInfo['browser']='acrobat';
} elseif(strstr($useragent,'IBrowse')) {
$browserInfo['browser']='ibrowse';
} elseif(strstr($useragent,'Teleport')) {
$browserInfo['browser']='teleport';
} elseif(strstr($useragent,'Mozilla')) {
$browserInfo['browser']='netscape';
} else {
$browserInfo['browser']='unknown';
}

(issue imported from #M51)

Actions #1

Updated by Pieter over 20 years ago

Browser identification strings:

Mozilla 1.6: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Internet Explorer 6: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Opera can report itself as Opera OR IE6 OR Mozilla 5.0 OR Mozilla 4.78 OR Mozilla 3.0:
As Opera: Opera/7.23 (Windows NT 5.1; U) [en]
As IE6: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23
As Mozilla 5.0: Mozilla/5.0 (Windows NT 5.1; U) Opera 7.23 [en]
As Mozilla 4.78: Mozilla/4.78 (Windows NT 5.1; U) Opera 7.23 [en]
As Mozilla 3.0: Mozilla/3.0 (Windows NT 5.1; U) Opera 7.23 [en]

Actions #2

Updated by Michael Stucki over 20 years ago

This problem should be solved in TYPO3 3.6.1, can you please confirm that?

Actions #3

Updated by Pieter over 20 years ago

Our site looks fine with 3.6.1. Each browser receives the correct CSS file, browser detection is working well again!

Actions

Also available in: Atom PDF