| 77 | |
| 78 | Another example is how out-of-range IPv4 should be handled: |
| 79 | |
| 80 | {{{ |
| 81 | echo wp_privacy_anonymize_data( 'ip', '999.999.999.999' ); |
| 82 | |
| 83 | }}} |
| 84 | |
| 85 | outputs: {{{'999.999.999.0'}}} but should it be instead {{{0.0.0.0}}} ? |
| 86 | |
| 87 | One might aim for a stricter IPv4 validation in a future ticket or e.g. ticket #34538 [https://core.trac.wordpress.org/ticket/34538 Improvement of the IPv4 address format check] on {{{WP_Http::is_ip_address}}}. |
| 88 | |
| 89 | I wonder if there should be a general WP IP utility (possible future ticket) to avoid IP handling duplications in various parts of the core (e.g. db hosts, HTTP API, Rest, Multisite support of IPv6, ... ). |