Ticket #9380 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

xmlrpc.php may give timeout error

Reported by: foks Owned by: josephscott
Priority: normal Milestone: 2.7.2
Component: XML-RPC Version: 2.7.1
Severity: minor Keywords: has-patch
Cc: joseph@…

Description

xmlrpc.php?rsd will give a timeout error if CURL is enabled on the server and the server doesn't listen on port 443.

The function url_is_accessable_via_ssl in includes/functions.php check if SSL is supported by trying to connect to the server on port 443. Timeout limit is not specificed so if the server doesn't answer (and doesn't deny the request) you get a php timeout.

I have solved this on my own installation by adding this row in the function: curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

Attachments

wp-includes--functions.php.diff Download (502 bytes) - added by josephscott 3 years ago.

Change History

Nice catch. I've added a basic patch to wp-includes/functions.php with adds your change.

  • Cc joseph@… added
  • Keywords has-patch added
  • Milestone changed from Unassigned to 2.7.2
  • Status changed from new to closed
  • Resolution set to fixed

(In [10830]) Set a short timeout for the SSL discovery support so that we don't block requests until the attempt timesout. Fixes #9380 for trunk

(In [10831]) Set a short timeout for the SSL discovery support so that we don't block requests until the attempt timesout. Fixes #9380 for 2.7.2 props josephscott

Note: See TracTickets for help on using tickets.