ua-parser / uap-core

The regex file necessary to build language ports of Browserscope's user agent parser.
Other
752 stars 451 forks source link

IE parsed as Outlook #29

Open stevesouders opened 9 years ago

stevesouders commented 9 years ago

The UA below is classified as "IE" by the original BrowserScope code (see http://www.browserscope.org/ua ), but the uap regex classify it as "Outlook". It seems like "IE" is the correct answer. Is "Outlook" preferred or is this a bug?

UA: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E; Microsoft Outlook 14.0.7109; ms-office; MSOffice 14)

I tested the BrowserScope code by going to http://www.browserscope.org/ua: image

I tested the uap regex using the uap-php code: $ php bin/uaparser.php ua-parser:parse "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E; Microsoft Outlook 14.0.7109; ms-office; MSOffice 14)" {"ua":{"major":"2010","minor":null,"patch":null,"family":"Outlook"},"os":{"major":null,"minor":null,"patch":null,"patchMinor":null,"family":"Windows 7"},"device":{"brand":null,"model":null,"family":"Other"},"originalUserAgent":"Mozilla\/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident\/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E; Microsoft Outlook 14.0.7109; ms-office; MSOffice 14)"}

Ironholds commented 9 years ago

It seems like it's an Outlook/MS Office-triggered render of a page, running the IE engine. So, isn't Outlook more precise?

stevesouders commented 9 years ago

I'm not sure that means it was initiated by Outlook or even rendered in Outlook. I think it's just a list of software that's installed on that PC. Notice, for example, that it also says "MSOffice" - but it wasn't rendered in MSOffice.

sindarina commented 9 years ago

If this is from a legitimate client, it generally means that it's a request from within Outlook 2010, for example when someone opens an HTML message that contains a reference to a file on the Internet. This often happens with signatures, marketing mail, and so on.

It also seems that, regardless of Office version and the version of the Internet Explorer/Trident engine that's actually installed, it will always drop down into some kind of IE 7 compatibility mode.

For example, this is Outlook 2013 on Windows 8, a version that ships with Internet Explorer 10 as the default;

"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3; Microsoft Outlook 15.0.4701; ms-office; MSOffice 15)"

I would therefore suggest that 'Outlook' is accurate, as it doesn't really say anything about the Internet Explorer version in actual use.