|
214 | 214 | adapters, for instance a built-in one, and one or more attached via USB.
|
215 | 215 | </p>
|
216 | 216 | <div>
|
217 |
| - An <dfn>NFC tag</dfn> is a passive NFC device. |
| 217 | + An <dfn>NFC tag</dfn> is a passive NFC device that is not <a>blocklisted</a>. |
218 | 218 | The <a>NFC tag</a> is powered by magnetic induction when an active NFC
|
219 | 219 | device is in proximity range. An <a>NFC tag</a> that supports <a>NDEF</a>
|
220 | 220 | contains a single <a>NDEF message</a>.
|
@@ -4273,6 +4273,63 @@ <h3>Parsing content</h3>
|
4273 | 4273 | </section>
|
4274 | 4274 | </section>
|
4275 | 4275 |
|
| 4276 | +<!-- - - - - - - - - - - - - - - The Blocklist - - - - - - - - - - - - - - - --> |
| 4277 | +<section> <h2 id="blocklist">The Blocklist</h2> |
| 4278 | + <p> |
| 4279 | + This specification relies on a blocklist file to restrict the set of NFC |
| 4280 | + devices a website can access. |
| 4281 | + </p> |
| 4282 | + <p> |
| 4283 | + The result of <dfn>parsing the blocklist</dfn> at a |url:URL| is a list of |
| 4284 | + historical bytes hexadecimal values, produced by the following algorithm: |
| 4285 | + <ol class=algorithm> |
| 4286 | + <li> |
| 4287 | + Fetch |url:URL|, and let |contents:string| be its body, decoded as UTF-8. |
| 4288 | + </li> |
| 4289 | + <li> |
| 4290 | + Let |lines:array| be |contents| split on `"\n"`. |
| 4291 | + </li> |
| 4292 | + <li> |
| 4293 | + Let |result:list| be an empty <a>list</a>. |
| 4294 | + </li> |
| 4295 | + <li> |
| 4296 | + [= list/For each =] |line:string| in |lines|, run the following sub-steps: |
| 4297 | + <ol> |
| 4298 | + <li> |
| 4299 | + If |line| is empty, continue to the next line. |
| 4300 | + </li> |
| 4301 | + <li> |
| 4302 | + If |line| starts with `"#"`, continue to the next line. |
| 4303 | + </li> |
| 4304 | + <li> |
| 4305 | + If |line| contains invalid hexadecimal values, continue to the next line. |
| 4306 | + </li> |
| 4307 | + <li> |
| 4308 | + <a>Append</a> |line| to |result|. |
| 4309 | + </li> |
| 4310 | + </li> |
| 4311 | + </ol> |
| 4312 | + </li> |
| 4313 | + <li> |
| 4314 | + Return |result|. |
| 4315 | + </li> |
| 4316 | + </ol> <!-- parsing the blocklist --> |
| 4317 | + </p> |
| 4318 | + <p> |
| 4319 | + The <dfn>blocklist</dfn> is the result of <a>parsing the blocklist</a> at |
| 4320 | + <a |
| 4321 | + href="https://github.com/w3c/web-nfc/blob/master/blocklist.txt">https://github.com/w3c/web-nfc/blob/master/blocklist.txt</a>. |
| 4322 | + The UA should re-fetch the blocklist periodically, but it’s unspecified how |
| 4323 | + often. |
| 4324 | + </p> |
| 4325 | + <p> |
| 4326 | + An <a>NFC device</a> is <dfn>blocklisted</dfn> if the <a>blocklist</a>’s |
| 4327 | + value contains the device's <a>historical bytes</a> hexadecimal values. In |
| 4328 | + ISO 14443-4 terminology, the <dfn>historical bytes</dfn> are a subset of the |
| 4329 | + RATS (Request for Answer To Select) response. |
| 4330 | + </p> |
| 4331 | +</section> |
| 4332 | + |
4276 | 4333 | <!-- - - - - - - - - - - - - Security and Privacy - - - - - - - - - - - - - -->
|
4277 | 4334 | <section> <h2 id="security">Security and Privacy</h2>
|
4278 | 4335 | <section> <h3>Chain of trust</h3>
|
@@ -4637,6 +4694,13 @@ <h3>Parsing content</h3>
|
4637 | 4694 | </p>
|
4638 | 4695 | </section>
|
4639 | 4696 |
|
| 4697 | + <section> <h4>Blocklist</h4> |
| 4698 | + <p> |
| 4699 | + Web NFC includes a <a>blocklist</a> of vulnerable NFC devices to prevent |
| 4700 | + websites from taking advantage of them. |
| 4701 | + </p> |
| 4702 | + </section> |
| 4703 | + |
4640 | 4704 | <section> <h4>Warn about risk of physical location leak</h4>
|
4641 | 4705 | <p>
|
4642 | 4706 | When listening for and writing <a>NFC content</a>,
|
|
0 commit comments