Security review fixes: keep pending-capture ids, ship uninstall.php (+verify step), webhook guard, IPv6 /64 + global order throttle, token-safe redirects, honest refund wording, request-id and overlay-token hardening
Test and Release / test (push) Successful in 1m23s
Test and Release / release (push) Successful in 5s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 14:07:44 -08:00
1 parent 68bd917660
commit 473fe192cd
28 files changed
+747 -34

No files matched your search

+25 -1
View File
@@ -79,5 +79,29 @@ final class ClientIpTest extends TestCase {
$this->assertSame( '198.18.0.5', ClientIp::resolve( $srv, ClientIp::MODE_AUTO ) );
$this->assertSame( self::CLIENT, ClientIp::resolve( $srv, ClientIp::MODE_AUTO, array( '198.18.0.0/15' ) ) );
}
}
public function test_bucket_key_ipv4_unchanged_and_unknown_stays(): void {
$this->assertSame( '203.0.113.9', ClientIp::bucketKey( '203.0.113.9' ) );
$this->assertSame( 'unknown', ClientIp::bucketKey( 'unknown' ) );
}
public function test_bucket_key_ipv6_collapses_to_slash_64(): void {
$a = ClientIp::bucketKey( '2001:db8:abcd:12::1' );
$b = ClientIp::bucketKey( '2001:0db8:abcd:0012:ffff:eeee:dddd:cccc' );
$this->assertSame( $a, $b, 'same /64 must share a bucket' );
$this->assertSame( '20010db8abcd0012/64', $a );
$this->assertNotSame( $a, ClientIp::bucketKey( '2001:db8:abcd:13::1' ), 'different /64 must differ' );
$this->assertNotSame( $a, ClientIp::bucketKey( '203.0.113.9' ) );
}
public function test_bucket_key_ipv4_mapped_ipv6_maps_to_the_ipv4(): void {
$this->assertSame( '203.0.113.9', ClientIp::bucketKey( '::ffff:203.0.113.9' ) );
$this->assertSame( '203.0.113.9', ClientIp::bucketKey( '::ffff:cb00:7109' ) );
}
public function test_bucket_key_garbage_becomes_unknown(): void {
foreach ( array( '', 'garbage', '999.1.1.1', '<script>', 'fe80::1%eth0' ) as $g ) {
$this->assertSame( 'unknown', ClientIp::bucketKey( $g ), $g );
}
}
}