Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#31384 new defect (bug)

Pingback does not work for schemeless URLs

Reported by: tobiaskochsonlinenet's profile tobiaskochsonlinenet Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Pings/Trackbacks Keywords: has-patch needs-unit-tests
Focuses: Cc:


I noticed that a pingback will not be send if the target URL is given as a schemeless URL (like //
This is because discover_pingback_server_uri() in comment.php is using the PHP function parse_url() which cannot handle schemeless URLs correctly.

Attachments (1)

31384.diff (537 bytes) - added by dshanske 8 years ago.
Switch to wp_parse_url which has backward compatibility

Download all attachments as: .zip

Change History (9)

#1 @DrewAPicture
9 years ago

  • Version changed from trunk to 1.5

#2 @kraftbj
9 years ago

Noting that PHP docs state that 5.4.7 corrects this.

#3 @johnbillion
9 years ago

  • Keywords needs-unit-tests needs-patch added

Test coverage ought to discover_pingback_server_uri() should pick this up via which gets tested on Travis.

Also is useful for testing code across PHP versions.

#4 @dshanske
8 years ago

This should work if we change to wp_parse_url

8 years ago

Switch to wp_parse_url which has backward compatibility

#5 @dshanske
8 years ago

  • Keywords has-patch added; needs-unit-tests needs-patch removed

This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.

8 years ago

#7 @rachelbaker
8 years ago

  • Keywords needs-unit-tests added

Still needs a unit test to confirm.

#8 @dshanske
8 years ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.