WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9380 closed defect (bug) (fixed)

xmlrpc.php may give timeout error

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

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 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 josephscott5 years ago

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

comment:2 josephscott5 years ago

  • Cc joseph@… added
  • Keywords has-patch added

comment:3 josephscott5 years ago

  • Milestone changed from Unassigned to 2.7.2

comment:4 westi5 years ago

  • 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

comment:5 westi5 years ago

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