docs(docs): R4.9 verifier and security follow-ups: §6 rows 19 (J2 device run, blocking before merge) and 20 (WebKit worker error trace); port 4173 in the exposure table as an owner-opened recette rule; serve.mjs post-bind check typed from the address; report-compare comment names the residual race

This commit is contained in:
bchanot committed 2026-10-20 22:05:04 +02:00
1 parent 854d988c07
commit 49b812b9b4
6 files changed
+21 -11

No files matched your search

+6 -7
View File
@@ -23,7 +23,7 @@ import { readFileSync } from 'node:fs'
import { readFile, stat } from 'node:fs/promises'
import { lookup } from 'node:dns/promises'
import { createServer } from 'node:http'
import { BlockList } from 'node:net'
import { BlockList, isIPv6 } from 'node:net'
import { extname, join, resolve, sep } from 'node:path'
import { pathToFileURL } from 'node:url'
import { parseArgs } from 'node:util'
@@ -36,12 +36,11 @@ const WILDCARDS = new BlockList()
WILDCARDS.addAddress('0.0.0.0', 'ipv4')
WILDCARDS.addAddress('::', 'ipv6')
// `dns.lookup` reports the family as 6, `server.address()` as 'IPv6'.
const isWildcard = ({ address, family }) =>
WILDCARDS.check(
address.replace(/%.*$/, ''),
family === 6 || family === 'IPv6' ? 'ipv6' : 'ipv4',
)
// The type comes from the address itself, whatever shape `family` takes.
const isWildcard = ({ address }) => {
const bare = address.replace(/%.*$/, '')
return WILDCARDS.check(bare, isIPv6(bare) ? 'ipv6' : 'ipv4')
}
/**
* The one address `host` names, resolved before any socket exists: an empty