Closed willyaranda closed 1 year ago
My bad. I was not scaping properly the Sec-CH-Ua fields with the leading and trailing "
chars
Sorry to reopen @nielsbasjes , but I think I got it right in the first time I opened the bug š¤¦
The UA I'm having issues is when there is no information about Edge, like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Even if the UACH are correctly set like:
Sec-Ch-Ua : '"Chromium";v="106", "Microsoft Edge";v="106", "Not;A=Brand";v="99"'
Sec-Ch-Ua-Arch : '<<<null>>>'
Sec-Ch-Ua-Mobile : '?0'
Sec-Ch-Ua-Model : '<<<null>>>'
Sec-Ch-Ua-Platform : '"Windows"'
Sec-Ch-Ua-Platform-Version : '<<<null>>>'
And the parsed output from the library is
UAClientHintBrands_0_Brand : 'Chromium'
UAClientHintBrands_0_Version : '106'
UAClientHintBrands_1_Brand : 'Microsoft Edge'
UAClientHintBrands_1_Version : '106'
I'm checking against other Legacy UA, like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.34
Which are correctly detected as Edge.
I've checked my Window 11 with Edge 106 and the user agent in my case is what you call the legacy UA:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.52
So how did you find the user agent you presented (i.e. without the 'Edg/...' part)?
The full set of my Edge (yaml syntax):
User-Agent : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.52'
Sec-Ch-Ua : '"Chromium";v="106", "Microsoft Edge";v="106", "Not;A=Brand";v="99"'
Sec-Ch-Ua-Arch : '"x86"'
Sec-Ch-Ua-Bitness : '"64"'
Sec-Ch-Ua-Full-Version : '"106.0.1370.52"'
Sec-Ch-Ua-Full-Version-List : '"Chromium";v="106.0.5249.119", "Microsoft Edge";v="106.0.1370.52", "Not;A=Brand";v="99.0.0.0"'
Sec-Ch-Ua-Mobile : '?0'
Sec-Ch-Ua-Model : '""'
Sec-Ch-Ua-Platform : '"Windows"'
Sec-Ch-Ua-Platform-Version : '"15.0.0"'
Sec-Ch-Ua-Wow64 : '?0'
@nielsbasjes this is a RAW dump of the headers of ClientEvent / ClientQos from the customers hitting our stats API.
I try to base detections on specs where possible/available. For Edge: https://learn.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-guidance#identifiers-for-microsoft-edge-on-various-platforms
On desktop operating systems, Microsoft Edge is commonly identified by the Edg token in the User-Agent string.
So the Edg
/EdgA
/EdgiOS
should always be there for it to be a real
Edge.
Are you being hit by fakers of some sort?
Not that we are aware of. Checking some of those customers seems legit and using our platform properly.
Other User Agent is version 105:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
I will dig more in case this is something strange
I have just released version 7.8.0 which contains this fix.
Please read this to ensure this is really a bug: https://yauaa.basjes.nl/developer/reportingissues/#these-are-not-bugs
The exact useragent useragent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36'
With the following UserAgentClient hints provided and printed by the parsed object of yauaa:
Expected/Incorrect fields AgentNameVersion:
Microsoft Edge 106
(and others that identify this as Chrome and not Edge) ...Expected behavior I expect this to be detected as Edge 106, and not Chrome, as the
Sec-Ch-Ua
sends correctly.Additional information If you know of specifications provided by the builder of the agent or system at hand then please provide these specifications.