Adds a fourth pass to ProjectZomboidRedactor that scrubs IPv4 (strict 0-255 octets, optional :port suffix) and IPv6 (full, abbreviated, bracketed-with-port, IPv4-mapped) addresses, replacing them with the literal [REDACTED_IP]. The new pass runs first because it is pattern-disjoint from the Steam-ID -> name -> coords chain. A single redactIpAddresses(bool) toggle controls both families; the existing toggles are unchanged. Strict regexes plus filter_var() validation prevent false positives on PZ timestamps (12:00:00.000) and PHP/Java scope ops (Foo::bar). 20 new tests cover bare/with-port/multiple/loopback/boundary IPv4, full / abbreviated / bracketed / IPv4-mapped IPv6, scope-op rejection, timestamp rejection, Steam-ID non-collision, toggle-off, and idempotence. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.3 KiB
3.3 KiB