Closed Bug 1693295 Opened 3 years ago Closed 3 years ago

Cap Windows version in the User-Agent to 10.0

Categories

(Core :: Networking: HTTP, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

In bug 1679929, we're capping the version number reported for macOS. I suggest we also cap the Windows version to 10.0. There isn't a change in sight to the version number reported by Windows, which means that if it ever changes, the potential for disruption to user agent sniffing is going to be large.

If we cap it to 10.0 now, we can then evaluate whether we want to change the Web-visible value if the OS-reported value ever changes instead of experiencing what happened with macOS: The OS API changing the value and us having to react to the breakage.

https://searchfox.org/mozilla-central/rev/0379f315c75a2875d716b4f5e1a18bf27188f1e6/netwerk/protocol/http/nsHttpHandler.cpp#951

No tests, because proper testing would need CI with Windows reporting a a version above 10.0.

Assignee: nobody → hsivonen
Status: NEW → ASSIGNED

Even if Windows changes the version number, the reported version number will not change until we update supportedOSes in the manifest, I guess. Nevertheless I totally agree with you. We don't have to rely on operating system's compatibility shim.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

I ran the test build on Windows 10 and Windows 7, and it didn't interfere with the pre-existing functionality. (I.e. reported 10.0 and 6.1, respectively, both via HTTP and navigator).

Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b60746765d3
Cap the Windows version in the User-Agent to 10.0. r=cpeterson
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Blocks: 1841425
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: