From 7b65aca7cc9c7c8d8e0aeebf3a3becf75b7931d1 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Wed, 30 Mar 2022 19:05:13 +0300 Subject: [PATCH] Avoid suggesting the empty string for navigator.platform navigator.platform was permitted to return the empty string due to a privacy-motivated spec change in ecefa6e105592656bf592e0abcf0276dad971fbc. Since 2008, the understanding of changing things like this for privacy has evolved from returning special privacy values to returning a value that is already commonly returned for non-privacy reasons. Therefore, change the spec not to say "the empty string" but to permit returning a string commonly returned on another platform. Additionally, change the examples to be from the set of values given at https://www.chromium.org/updates/ua-reduction/ to avoid suggesting more-identifying and potentially-less-compatible values. But, for now, avoid actually constraining the permitted values to a reduced set. Further work on constraining these values is tracked mostly in https://github.com/whatwg/compat; see especially https://github.com/whatwg/compat/issues/174. --- source | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source b/source index 864b47b95a9..a881c52584e 100644 --- a/source +++ b/source @@ -98597,9 +98597,10 @@ interface Navigator {
platform
-

Must return either the empty string or a string representing the platform on which the - browser is executing, e.g. "MacIntel", "Win32", - "FreeBSD i386", "WebTV OS".

+

Must return a string representing the platform on which the + browser is executing (e.g. "MacIntel", "Win32", + "Linux x86_64", "Linux armv81") or, for privacy and + compatibility, a string that is commonly returned on another platform.

product

Must return the string "Gecko".