Make WordPress Core

Opened 21 years ago

Closed 20 years ago

Last modified 19 years ago

#1668 closed defect (bug) (fixed)

pingback xml format is false

Reported by: jeena-paradies-spamjeenaparadiesnet's profile Jeena Paradies <spam@…> Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: normal Version: 1.5.2
Component: XML-RPC Keywords: pingback bg|has-patch bg|dev-feedback bg|commit bg|squashed
Focuses: Cc:

Description

In /wp-includes/comment-functions.php you send a pingback this way:

$client->query('pingback.ping', array($pagelinkedfrom, $pagelinkedto) )

so it becomes:

<?xml version="1.0"?>
<methodCall>
 <methodName>pingback.ping</methodName>
 <params>
  <param><value><array><data>
   <value><string>http://example.org/test.html</string></value>
   <value><string>http://example.org/2005/09/hallo</string></value>
  </data></array></value></param>
 </params>
</methodCall>

The pingback specifications http://www.hixie.ch/specs/pingback/pingback says that we need such XML for a valid pingback:

<?xml version="1.0"?>
<methodCall>
 <methodName>pingback.ping</methodName>
 <params>
  <param><value><string>http://jlog.dev/test.html</string></value></param>
  <param><value><string>http://jlog.dev/2005/09/hallo</string></value></param>
 </params>
</methodCall>

If you call the method this way:

$client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto)

without the array, it'll send the right XML format.

Attachments (1)

comment-functions.php.diff (617 bytes) - added by markjaquith 20 years ago.
Patch for latest WP 1.6 SVN

Download all attachments as: .zip

Change History (7)

#1 @ryan
20 years ago

  • Milestone changed from 1.5.2 to 1.6

@markjaquith
20 years ago

Patch for latest WP 1.6 SVN

#2 @markjaquith
20 years ago

  • Keywords bg|has-patch bg|dev-feedback added
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

I know nothing of the issue, but the patch I uploaded makes the change.

#3 @masquerade
20 years ago

  • Keywords bg|commit bg|squashed added

I'll chime in and say that this is the proper fix, last arg being an array causes IXR_Value to go recursive and output the <array> and such tags. http://www.hixie.ch/specs/pingback/pingback-1.0#send is the important bit of the Pingback specification, it expects two args, and instead WP would be passing 1 arg as an array with the 2 args it should be sending seperately

#4 @matt
20 years ago

Do we still receivee pingbacks correctly after this change?

#5 @matt
20 years ago

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

(In [3078]) Follow standards in Pingback - fixes #1668

#6 @(none)
19 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.