From 1942f49fe6cb8f1d38c6b8fabe678180c51b6c6f Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 31 Jan 2024 13:03:57 +0000 Subject: [PATCH] HTTP API: Ensure cookie names are cast to strings. Props nosilver4u, darssen, kraftbj, engahmeds3ed, barry.hughes, schlessera. Fixes #58566. Built from https://develop.svn.wordpress.org/trunk@57501 git-svn-id: http://core.svn.wordpress.org/trunk@57002 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-http.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php index a30f9f7931..bbb6dd41ae 100644 --- a/wp-includes/class-wp-http.php +++ b/wp-includes/class-wp-http.php @@ -467,9 +467,9 @@ class WP_Http { return null !== $attr; } ); - $cookie_jar[ $value->name ] = new WpOrg\Requests\Cookie( $value->name, $value->value, $attributes, array( 'host-only' => $value->host_only ) ); + $cookie_jar[ $value->name ] = new WpOrg\Requests\Cookie( (string) $value->name, $value->value, $attributes, array( 'host-only' => $value->host_only ) ); } elseif ( is_scalar( $value ) ) { - $cookie_jar[ $name ] = new WpOrg\Requests\Cookie( $name, (string) $value ); + $cookie_jar[ $name ] = new WpOrg\Requests\Cookie( (string) $name, (string) $value ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 30e567169b..9ece4d67cd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57500'; +$wp_version = '6.5-alpha-57501'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.