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

+4 -3
View File
@@ -116,9 +116,10 @@ final class Client {
* @param array<string,mixed> $headers Incoming webhook request headers (any case; '-' or '_').
*/
public function verifyWebhook( array $headers, string $rawBody, string $webhookId ): bool {
$h = array();
foreach ( $headers as $k => $v ) {
$h[ strtolower( str_replace( '-', '_', (string) $k ) ) ] = is_array( $v ) ? (string) ( $v[0] ?? '' ) : (string) $v;
$h = WebhookGuard::normalizeHeaders( $headers );
// Local pre-checks (headers present, paypal.com cert_url, replay window, size): never spend an outbound call on junk.
if ( null !== WebhookGuard::check( $headers, $rawBody, time() ) ) {
return false;
}
$event = json_decode( $rawBody );
if ( ! is_object( $event ) || '' === $webhookId ) {