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

Opened 3 years ago

Last modified 3 years ago

Error in URL checking in http.php

Reported by: mercurix Owned by:
Priority: normal Milestone: 2.7.1
Component: HTTP Version: 2.7
Severity: critical Keywords: has-patch commit
Cc:

Description

There is a bug in wp-includes/http.php in the 2.7 release. In line 753 it reads:

if ( 'http' != $arrURLscheme?
'https' != $arrURLscheme? )

What should be there instead is:

if ( 'http' != $arrURLscheme? && 'https' != $arrURLscheme? )

Without this fix Wordpress will fail to call its wp-cron.php (and leading to a crash with seg fault for me) if the Wordpress installation is on an https server and cannot be reached with http.

Attachments

8787.diff Download (2.6 KB) - added by jacobsantos 3 years ago.
Some documentation and the other fix.

Change History

  • Owner anonymous deleted
  • Component changed from General to HTTP

comment:2   ryan3 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [10309]) And instead of or. Props mercurix. fixes #8787 for trunk

comment:3   ryan3 years ago

(In [10310]) And instead of or. Props mercurix. fixes #8787 for 2.7

  • Status changed from closed to reopened
  • Resolution fixed deleted

This is in two locations. You fixed the first one, the second one needs to be corrected as well.

Found in line ~633 also.

Some documentation and the other fix.

  • Keywords has-patch commit added

Patch fixes the other location as well as adds some inline documentation.

comment:8   ryan3 years ago

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [10320]) Fix URL checking and add phpdoc. Props jacobsantos. fixes #8787 for trunk

comment:9   ryan3 years ago

(In [10321]) Fix URL checking and add phpdoc. Props jacobsantos. fixes #8787 for 2.7

Note: See TracTickets for help on using tickets.