Skip to content

Commit febea88

Browse files
committed
Use Infra as infrastructure for tracking/fingerprinting marking
This depends on whatwg/wattsi#41, whatwg/infra#115 (which depends on speced/bikeshed#964), and whatwg/whatwg.org#64.
1 parent 0b8e268 commit febea88

File tree

1 file changed

+45
-123
lines changed

1 file changed

+45
-123
lines changed

source

Lines changed: 45 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -785,94 +785,6 @@ interface <dfn data-x="">Example</dfn> {
785785

786786

787787

788-
<h3 id="fingerprint">Privacy concerns</h3>
789-
790-
<!-- NON-NORMATIVE SECTION -->
791-
792-
<p>Some features of HTML trade user convenience for a measure of user privacy.</p>
793-
794-
<p>In general, due to the Internet's architecture, a user can be distinguished from another by the
795-
user's IP address. IP addresses do not perfectly match to a user; as a user moves from device to
796-
device, or from network to network, their IP address will change; similarly, NAT routing, proxy
797-
servers, and shared computers enable packets that appear to all come from a single IP address to
798-
actually map to multiple users. Technologies such as onion routing can be used to further
799-
anonymize requests so that requests from a single user at one node on the Internet appear to come
800-
from many disparate parts of the network.</p>
801-
802-
<p>However, the IP address used for a user's requests is not the only mechanism by which a user's
803-
requests could be related to each other. Cookies, for example, are designed specifically to enable
804-
this, and are the basis of most of the Web's session features that enable you to log into a site
805-
with which you have an account.</p>
806-
807-
<p>There are other mechanisms that are more subtle. Certain characteristics of a user's system can
808-
be used to distinguish groups of users from each other; by collecting enough such information, an
809-
individual user's browser's "digital fingerprint" can be computed, which can be as good as, if not
810-
better than, an IP address in ascertaining which requests are from the same user.</p>
811-
812-
<p>Grouping requests in this manner, especially across multiple sites, can be used for both benign
813-
(and even arguably positive) purposes, as well as for malevolent purposes. An example of a
814-
reasonably benign purpose would be determining whether a particular person seems to prefer sites
815-
with dog illustrations as opposed to sites with cat illustrations (based on how often they visit
816-
the sites in question) and then automatically using the preferred illustrations on subsequent
817-
visits to participating sites. Malevolent purposes, however, could include governments combining
818-
information such as the person's home address (determined from the addresses they use when getting
819-
driving directions on one site) with their apparent political affiliations (determined by
820-
examining the forum sites that they participate in) to determine whether the person should be
821-
prevented from voting in an election.</p>
822-
823-
<p>Since the malevolent purposes can be remarkably evil, user agent implementers are encouraged to
824-
consider how to provide their users with tools to minimize leaking information that could be used
825-
to fingerprint a user.</p>
826-
827-
<p>Unfortunately, as the first paragraph in this section implies, sometimes there is great benefit
828-
to be derived from exposing the very information that can also be used for fingerprinting
829-
purposes, so it's not as easy as simply blocking all possible leaks. For instance, the ability to
830-
log into a site to post under a specific identity requires that the user's requests be
831-
identifiable as all being from the same user, more or less by definition. More subtly, though,
832-
information such as how wide text is, which is necessary for many effects that involve drawing
833-
text onto a canvas (e.g. any effect that involves drawing a border around the text) also leaks
834-
information that can be used to group a user's requests. (In this case, by potentially exposing,
835-
via a brute force search, which fonts a user has installed, information which can vary
836-
considerably from user to user.)</p>
837-
838-
<p w-nodev>Features in this specification which can be <dfn data-x="fingerprinting vector">used to
839-
fingerprint the user</dfn> are marked as this paragraph is.
840-
<!--INSERT FINGERPRINT-->
841-
</p>
842-
843-
<p>Other features in the platform can be used for the same purpose, though, including, though not
844-
limited to:</p>
845-
846-
<ul>
847-
848-
<li>The exact list of which features a user agents supports.</li>
849-
850-
<li>The maximum allowed stack depth for recursion in script.</li>
851-
852-
<li>Features that describe the user's environment, like Media Queries and the <code>Screen</code>
853-
object. <ref spec=MQ> <ref spec=CSSOMVIEW></li>
854-
855-
<li>The user's time zone.</li>
856-
857-
</ul>
858-
859-
860-
<h4 id="fingerprint-postMessage">Cross-site communication</h4>
861-
862-
<p>The <code data-x="dom-window-postMessage">postMessage()</code> API provides a mechanism by
863-
which two sites can communicate directly. At first glance, this might appear to open a new way by
864-
which the problems described above can occur. However, in practice, multiple mechanisms exist by
865-
which two sites can communicate that predate this API: a site embedding another can send data via
866-
an <code>iframe</code> element's dimensions; a site can use a cross-site image request with a
867-
unique identifier known to the server to initiate a server-side data exchange; or indeed the
868-
fingerprinting techniques described above can be used by two sites to uniquely identify a visitor
869-
such that information can then be exchanged on the server side.</p>
870-
871-
<p>Fundamentally, users that do not trust a site to treat their information with respect have to
872-
avoid visiting that site at all.</p>
873-
874-
875-
876788

877789
<h3>A quick introduction to HTML</h3>
878790

@@ -2174,7 +2086,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
21742086
fingerprinting vector that increases the chances of users being uniquely identified, user agents
21752087
are encouraged to support the exact same set of <span data-x="plugin">plugins</span> for each
21762088
user.
2177-
<!--INSERT FINGERPRINT-->
2089+
<!--INSERT TRACKING-->
21782090
</p>
21792091

21802092
</div>
@@ -2436,7 +2348,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
24362348
<p id="hardwareLimitations">User agents may impose implementation-specific limits on otherwise
24372349
unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of
24382350
memory, or to work around platform-specific limitations.
2439-
<!--INSERT FINGERPRINT-->
2351+
<!--INSERT TRACKING-->
24402352
</p>
24412353

24422354
<p>For compatibility with existing content and prior specifications, this specification describes
@@ -2474,6 +2386,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
24742386
<li>The general iteration terms <dfn data-x-href="https://infra.spec.whatwg.org/#iteration-while">while</dfn>,
24752387
<dfn data-x-href="https://infra.spec.whatwg.org/#iteration-continue">continue</dfn>, and
24762388
<dfn data-x-href="https://infra.spec.whatwg.org/#iteration-break">break</dfn>.</li>
2389+
<li id="fingerprint"><span id="fingerprinting-vector"></span><dfn
2390+
data-x-href="https://infra.spec.whatwg.org/#tracking-vector">tracking vector</dfn>
2391+
<!-- INSERT TRACKING -->
2392+
</li>
24772393
<li><dfn data-x-href="https://infra.spec.whatwg.org/#code-point">code point</dfn> and its synonym
24782394
<dfn data-x-href="https://infra.spec.whatwg.org/#code-point">character</dfn></li>
24792395
<li><dfn data-x-href="https://infra.spec.whatwg.org/#surrogate">surrogate</dfn></li>
@@ -9469,7 +9385,9 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
94699385
origin</span>, the user agent must throw a <span>"<code>SecurityError</code>"</span>
94709386
<code>DOMException</code>. Otherwise, the user agent must return the <span>cookie-string</span>
94719387
for the document's <span data-x="concept-document-url">URL</span> for a "non-HTTP" API, decoded
9472-
using <span>UTF-8 decode without BOM</span>. <ref spec=COOKIES><!--INSERT FINGERPRINT--></p>
9388+
using <span>UTF-8 decode without BOM</span>. <ref spec=COOKIES>
9389+
<!--INSERT TRACKING-->
9390+
</p>
94739391

94749392
<p>On setting, if the document is a <span>cookie-averse <code>Document</code> object</span>, then
94759393
the user agent must do nothing. Otherwise, if the <code>Document</code>'s <span>origin</span> is
@@ -34757,7 +34675,7 @@ interface <dfn>MediaError</dfn> {
3475734675
<span>media resource</span>. In the even rarer case of a <span>media resource</span> with no
3475834676
explicit timings of any kind, not even frame durations, the user agent must itself determine the
3475934677
time for each frame in a user-agent-defined manner.
34760-
<!--INSERT FINGERPRINT-->
34678+
<!--INSERT TRACKING-->
3476134679
</p>
3476234680

3476334681
<p class="note">An example of a file format with no explicit timeline but with explicit frame
@@ -48669,7 +48587,7 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
4866948587
implementation-defined string that means "Submit" or some such.</span> The element is a <span
4867048588
data-x="concept-button">button</span>, specifically a <span data-x="concept-submit-button">submit
4867148589
button</span>.
48672-
<!--INSERT FINGERPRINT-->
48590+
<!--INSERT TRACKING-->
4867348591
</p>
4867448592

4867548593
<p class="note">Since the default label is implementation-defined, and the width of the button
@@ -49042,7 +48960,7 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
4904248960
attribute, the button's label must be the value of that attribute; otherwise, it must be an
4904348961
implementation-defined string that means "Reset" or some such.</span> The element is a <span
4904448962
data-x="concept-button">button</span>.
49045-
<!--INSERT FINGERPRINT-->
48963+
<!--INSERT TRACKING-->
4904648964
</p>
4904748965

4904848966
<p class="note">Since the default label is implementation-defined, and the width of the button
@@ -64345,7 +64263,7 @@ try {
6434564263
the <code>CanvasText</code> interface, and then using the returned <span>inline box</span> must
6434664264
return a new <code>TextMetrics</code> object with members behaving as described in the following
6434764265
list: <ref spec=CSS>
64348-
<!--INSERT FINGERPRINT-->
64266+
<!--INSERT TRACKING-->
6434964267
</p>
6435064268

6435164269
</div>
@@ -75869,7 +75787,7 @@ addShortcutKeyLabel(document.getElementById('c'));</code></pre>
7586975787
key that corresponds to the value given in the attribute, can be used as the access key, then
7587075788
the user agent may assign that combination of keys as the element's <span>assigned access
7587175789
key</span> and return.
75872-
<!--INSERT FINGERPRINT-->
75790+
<!--INSERT TRACKING-->
7587375791
</p></li>
7587475792

7587575793
</ol>
@@ -88884,7 +88802,7 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8888488802
<li>The user has not disabled scripting for this <span>browsing context</span> at this time.
8888588803
(User agents may provide users with the option to disable scripting globally, or in a
8888688804
finer-grained manner, e.g. on a per-origin basis.)
88887-
<!--INSERT FINGERPRINT-->
88805+
<!--INSERT TRACKING-->
8888888806
</li>
8888988807

8889088808
<li id="sandboxScriptBlocked">The <span>browsing context</span>'s <span>active document</span>'s
@@ -91671,7 +91589,7 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9167191589

9167291590
<li><p>Let <var>message</var> be a user-agent-defined string describing the error in a
9167391591
helpful manner.
91674-
<!--INSERT FINGERPRINT-->
91592+
<!--INSERT TRACKING-->
9167591593
</p></li>
9167691594

9167791595
<li><p>Let <var>errorValue</var> be the value that represents the error: in the case of an
@@ -95585,7 +95503,7 @@ interface <dfn>Navigator</dfn> {
9558595503
profile the user. In fact, if enough such information is available, a user can actually be
9558695504
uniquely identified. For this reason, user agent implementers are strongly urged to include as
9558795505
little information in this API as possible.
95588-
<!--INSERT FINGERPRINT-->
95506+
<!--INSERT TRACKING-->
9558995507
</p>
9559095508

9559195509
</div>
@@ -95666,7 +95584,7 @@ interface <dfn>Navigator</dfn> {
9566695584

9566795585
<li>Any information in this API that varies from user to user can be used to profile or identify
9566895586
the user.
95669-
<!--INSERT FINGERPRINT-->
95587+
<!--INSERT TRACKING-->
9567095588
</li>
9567195589

9567295590
<li>If the user is not using a service that obfuscates the user's point of origin (e.g. the Tor
@@ -95683,7 +95601,7 @@ interface <dfn>Navigator</dfn> {
9568395601
<p>To avoid introducing any more fingerprinting vectors, user agents should use the same list for
9568495602
the APIs defined in this function as for the HTTP `<code
9568595603
data-x="http-accept-language">Accept-Language</code>` header.
95686-
<!--INSERT FINGERPRINT-->
95604+
<!--INSERT TRACKING-->
9568795605
</p>
9568895606

9568995607
</div>
@@ -96216,13 +96134,13 @@ interface <dfn>MimeType</dfn> {
9621696134
<p>The <span>supported property indices</span> of a <code>PluginArray</code> object are the
9621796135
numbers from zero to the number of non-<span data-x="hidden plugin">hidden</span> <span
9621896136
data-x="plugin">plugins</span> represented by the object, if any.
96219-
<!--INSERT FINGERPRINT-->
96137+
<!--INSERT TRACKING-->
9622096138
</p>
9622196139

9622296140
<p>The <dfn><code data-x="dom-PluginArray-length">length</code></dfn> attribute must return the
9622396141
number of non-<span data-x="hidden plugin">hidden</span> <span data-x="plugin">plugins</span>
9622496142
represented by the object.
96225-
<!--INSERT FINGERPRINT-->
96143+
<!--INSERT TRACKING-->
9622696144
</p>
9622796145

9622896146
<p>The <dfn><code data-x="dom-PluginArray-item">item()</code></dfn> method of a
@@ -96243,14 +96161,14 @@ interface <dfn>MimeType</dfn> {
9624396161

9624496162
</ol>
9624596163

96246-
<p class="note">It is important <span class="no-backref" data-x="fingerprinting vector">for
96247-
privacy</span> that the order of plugins not leak additional information, e.g. the order in which
96164+
<p class="note">It is important <span class="no-backref" data-x="tracking vector">for
96165+
privacy</span> that the order of plugins not leak additional information, e.g., the order in which
9624896166
plugins were installed.</p>
9624996167

9625096168
<p>The <span>supported property names</span> of a <code>PluginArray</code> object are the values
9625196169
of the <code data-x="dom-Plugin-name">name</code> attributes of all the <code
9625296170
data-x="dom-Plugin">Plugin</code> objects represented by the <code>PluginArray</code> object.
96253-
<!--INSERT FINGERPRINT-->
96171+
<!--INSERT TRACKING-->
9625496172
</p>
9625596173

9625696174
<p>The <dfn><code data-x="dom-PluginArray-namedItem">namedItem()</code></dfn> method of a
@@ -96295,14 +96213,14 @@ interface <dfn>MimeType</dfn> {
9629596213
supported</span> by non-<span data-x="hidden plugin">hidden</span> <span
9629696214
data-x="plugin">plugins</span> represented by the corresponding <code>PluginArray</code> object, if
9629796215
any.
96298-
<!--INSERT FINGERPRINT-->
96216+
<!--INSERT TRACKING-->
9629996217
</p>
9630096218

9630196219
<p>The <dfn><code data-x="dom-MimeTypeArray-length">length</code></dfn> attribute must return the
9630296220
number of <span data-x="MIME type">MIME types</span> <span>explicitly supported</span> by non-<span
9630396221
data-x="hidden plugin">hidden</span> <span data-x="plugin">plugins</span> represented by the
9630496222
corresponding <code>PluginArray</code> object, if any.
96305-
<!--INSERT FINGERPRINT-->
96223+
<!--INSERT TRACKING-->
9630696224
</p>
9630796225

9630896226
<p>The <dfn><code data-x="dom-MimeTypeArray-item">item()</code></dfn> method of a
@@ -96324,14 +96242,14 @@ interface <dfn>MimeType</dfn> {
9632496242

9632596243
</ol>
9632696244

96327-
<p class="note">It is important <span class="no-backref" data-x="fingerprinting vector">for
96328-
privacy</span> that the order of MIME types not leak additional information, e.g. the order in
96245+
<p class="note">It is important <span class="no-backref" data-x="tracking vector">for
96246+
privacy</span> that the order of MIME types not leak additional information, e.g., the order in
9632996247
which plugins were installed.</p>
9633096248

9633196249
<p>The <span>supported property names</span> of a <code>MimeTypeArray</code> object are the values
9633296250
of the <code data-x="dom-MimeType-type">type</code> attributes of all the <code>MimeType</code>
9633396251
objects represented by the <code>MimeTypeArray</code> object.
96334-
<!--INSERT FINGERPRINT-->
96252+
<!--INSERT TRACKING-->
9633596253
</p>
9633696254

9633796255
<p>The <dfn><code data-x="dom-MimeTypeArray-namedItem">namedItem()</code></dfn> method of a
@@ -96360,12 +96278,12 @@ interface <dfn>MimeType</dfn> {
9636096278

9636196279
<p>The <span>supported property indices</span> of a <code data-x="dom-Plugin">Plugin</code> object
9636296280
are the numbers from zero to the number of <span>reported MIME types</span>.
96363-
<!--INSERT FINGERPRINT-->
96281+
<!--INSERT TRACKING-->
9636496282
</p>
9636596283

9636696284
<p>The <dfn><code data-x="dom-Plugin-length">length</code></dfn> attribute must return the number
9636796285
of <span>reported MIME types</span>.
96368-
<!--INSERT FINGERPRINT-->
96286+
<!--INSERT TRACKING-->
9636996287
</p>
9637096288

9637196289
<p>The <dfn><code data-x="dom-Plugin-item">item()</code></dfn> method of a <code
@@ -96385,14 +96303,14 @@ interface <dfn>MimeType</dfn> {
9638596303

9638696304
</ol>
9638796305

96388-
<p class="note">It is important <span class="no-backref" data-x="fingerprinting vector">for
96389-
privacy</span> that the order of MIME types not leak additional information, e.g. the order in
96306+
<p class="note">It is important <span class="no-backref" data-x="tracking vector">for
96307+
privacy</span> that the order of MIME types not leak additional information, e.g., the order in
9639096308
which plugins were installed.</p>
9639196309

9639296310
<p>The <span>supported property names</span> of a <code data-x="dom-Plugin">Plugin</code> object
9639396311
are the values of the <code data-x="dom-MimeType-type">type</code> attributes of the
9639496312
<code>MimeType</code> objects representing the <span>reported MIME types</span>.
96395-
<!--INSERT FINGERPRINT-->
96313+
<!--INSERT TRACKING-->
9639696314
</p>
9639796315

9639896316
<p>The <dfn><code data-x="dom-Plugin-namedItem">namedItem()</code></dfn> method of a <code
@@ -96418,7 +96336,7 @@ interface <dfn>MimeType</dfn> {
9641896336
data-x="dom-Plugin-description">description</code> attribute just return the same value as the
9641996337
<code data-x="dom-Plugin-name">name</code> attribute, and that the <code
9642096338
data-x="dom-Plugin-filename">filename</code> attribute return the empty string.
96421-
<!--INSERT FINGERPRINT-->
96339+
<!--INSERT TRACKING-->
9642296340
</p>
9642396341

9642496342
<hr>
@@ -96448,7 +96366,7 @@ interface <dfn>MimeType</dfn> {
9644896366
data-x="dom-MimeType-description">description</code> attribute just return the same value as the
9644996367
<code data-x="dom-MimeType-type">type</code> attribute, and that the <code
9645096368
data-x="dom-MimeType-suffixes">suffixes</code> attribute return the empty string.
96451-
<!--INSERT FINGERPRINT-->
96369+
<!--INSERT TRACKING-->
9645296370
</p>
9645396371

9645496372
<p class="note">Commas in the <code data-x="dom-MimeType-suffixes">suffixes</code> attribute are
@@ -96467,7 +96385,7 @@ interface <dfn>MimeType</dfn> {
9646796385
<p>The <dfn><code data-x="dom-navigator-javaEnabled">navigator.javaEnabled()</code></dfn> method
9646896386
must return true if the user agent supports a <span>plugin</span> that supports the <span>MIME
9646996387
type</span> "<code data-x="">application/x-java-vm</code>"; otherwise it must return false.
96470-
<!--INSERT FINGERPRINT-->
96388+
<!--INSERT TRACKING-->
9647196389
</p>
9647296390

9647396391
</div>
@@ -99134,8 +99052,11 @@ dictionary <dfn>CloseEventInit</dfn> : <span>EventInit</span> {
9913499052
that allows documents to communicate with each other regardless of their source domain, in a way
9913599053
designed to not enable cross-site scripting attacks.</p>
9913699054

99137-
<p class="note">This API <a href="#fingerprint-postMessage">has some privacy implications</a> that
99138-
might not be immediately obvious.</p>
99055+
<p class="note" id="fingerprint-postMessage">The <code
99056+
data-x="dom-window-postMessage">postMessage()</code> API can be used as a <span>tracking
99057+
vector</span>.
99058+
<!-- INSERT TRACKING -->
99059+
</p>
9913999060

9914099061

9914199062
<h4>Introduction</h4>
@@ -101911,7 +101832,8 @@ interface <dfn>SharedWorker</dfn> : <span>EventTarget</span> {
101911101832
data-x="dom-navigator-hardwareConcurrency">navigator.hardwareConcurrency</code></dfn> attribute's
101912101833
getter must return a number between 1 and the number of logical processors potentially available
101913101834
to the user agent. If this cannot be determined, the getter must return 1.
101914-
<!--INSERT FINGERPRINT--></p>
101835+
<!--INSERT TRACKING-->
101836+
</p>
101915101837

101916101838
<p>User agents should err toward exposing the number of logical processors available, using lower
101917101839
values only in cases where there are user-agent specific limits in place (such as a limitation
@@ -102473,7 +102395,7 @@ interface <dfn>Storage</dfn> {
102473102395

102474102396
<p>The <dfn><code data-x="dom-localStorage">localStorage</code></dfn> object provides a
102475102397
<code>Storage</code> object for an <span>origin</span>.
102476-
<!--INSERT FINGERPRINT-->
102398+
<!--INSERT TRACKING-->
102477102399
</p>
102478102400

102479102401
<dl class="domintro">

0 commit comments

Comments
 (0)