#60602 closed defect (bug) (invalid)
WordPress 6.4.3 on PHP 8.3 curl function seems to relate to an infinite loop causing server crash
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.4.3 |
Component: | HTTP API | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Based on the part of analysis https://take.ms/pIbia we have a plugin called "Speaker" https://codecanyon.net/item/speaker-page-to-speech-plugin-for-wordpress/24336046?s_rank=2
which searches for an icon for the player, determines its name and makes a request through the standard WP function https://developer.wordpress.org/reference/functions/wp_remote_get/ Further, everything happens under WordPress control. In the logs, the problem occurs in the function highlighted in blue https://take.ms/pIbia, but it is in the WordPress core.
This is repeated in an indefinite loop, causing the server to crash. On PHP 8.1 or PHP 8.2 there is not such a behavior.
Attachments (1)
Change History (5)
#1
@
15 months ago
- Focuses php-compatibility removed
- Keywords reporter-feedback added; 2nd-opinion needs-patch removed
#2
@
15 months ago
Hi there, sure
here is the code in question:
/
- Get svg code of the svg file
*
- @param $key
- @param array $options
*
- @return string
*/
private static function get_svg( $key, array $options = [] ): string {
$ssl_verify = isset( $options[ 'check_ssl' ] ) ?? $options[ 'check_ssl' ] === 'on';
$file_content = wp_remote_get(
Plugin::get_url() . 'images/mdc-icons/' . $options[ $key ],
[
'sslverify' => $ssl_verify
]
);
if ( is_wp_error( $file_content ) ) { return ; }
return wp_remote_retrieve_body( $file_content ) ?? ;
}
Steps to reproduce
- Install Speaker Plugin first, which uses cURL /wp_remote_get
- Start with WordPress 6.4.3. with PHP 8.2. >no problem
- Upgrade on WordPress 6.4.3 to PHP 8.3. >infinite loop by curl /wp_remote_get/
OS: Linux 6.5.0-18-generic x86_64
Web server: Apache
PHP: 8.3.1
cURL Version: 7.81.0 OpenSSL/3.0.2
Hope that helps - please let me know in case you need more information.
Thanks
#3
@
15 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
This is a paid plugin. I'm sure you understand you can't expect contributors here to purchase that plugin just for testing an issue you are experiencing.
Sending this to the plugin author is the best course of action. This is probably just a bug in their plugin.
I'm closing this one for now.
If it turns out otherwise, and if there's a code to reproduce showing it's a core issue, we can consider reopening.
#4
@
15 months ago
Hi,
ok. we tried to speak with the plugin author, but we got notified that they suspect the rootcause in standard WP Core functions and that since 6.4.3 is in Beta Support for PHP 8.3 that the issues we are seeing coming from core.
Ok we try our luck again with plugin author.
Thanks
Hi there and welcome to WordPress Trac!
It would be tremendously helpful if you could provide code and detailed steps to reproduce this issue, including specific OS, PHP and cURL versions. Because without this, it is not clear whether there is even a bug in WordPress, or in how you use the code to make HTTP requests.