Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#9380 closed defect (bug) (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (6)

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
  • Resolution set to fixed
  • Status changed from new to closed

(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.