aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src/hash.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-20 17:10:49 +0900
committernsfisis <nsfisis@gmail.com>2026-07-20 17:10:49 +0900
commit5ef607e2afe7eaf7e2ccdf62f3ffacfede3c5fca (patch)
treeca46c8f66cbe5af345ec2e08c9a12c843ffe81b2 /crates/shirabe-php-shim/src/hash.rs
parentc175989cfa8b9558373edd1bd0696fd2a68431c2 (diff)
downloadphp-shirabe-5ef607e2afe7eaf7e2ccdf62f3ffacfede3c5fca.tar.gz
php-shirabe-5ef607e2afe7eaf7e2ccdf62f3ffacfede3c5fca.tar.zst
php-shirabe-5ef607e2afe7eaf7e2ccdf62f3ffacfede3c5fca.zip
fix(no-proxy-pattern): stop chr() corrupting IP bytes as lossy UTF-8
shirabe_php_shim::chr() returned a Rust String, which lossily re-encodes bytes >= 0x80 as UTF-8 replacement characters. ip_get_mask, ip_get_network, and ip_map_to_6 relied on chr() to build raw in_addr and netmask byte arrays, corrupting IPv4-in-IPv6 mappings and CIDR netmasks. Build the Vec<u8> byte arrays directly instead of round-tripping through String, and un-ignore test_ip_address and test_ip_range now that the underlying bug is fixed. chr()'s only other caller (http_downloader.rs, an ASCII ESC byte in a regex pattern) didn't need the indirection either, so remove the shim function entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src/hash.rs')
0 files changed, 0 insertions, 0 deletions