WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#5655 closed defect (bug) (wontfix)

IXR_Error error messages should be in CDATA section

Reported by: filosofo Owned by: westi
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch IXR_Error xml-rpc xmlrpc xml cdata
Focuses: Cc:

Description

Because:

  1. Semantically, they shouldn't be parsed.
  2. Practically, sometimes you want to output an error message that isn't properly formed XML, such as a var dump.

Attachments (1)

cdata_wrap.diff (467 bytes) - added by filosofo 8 years ago.

Download all attachments as: .zip

Change History (7)

@filosofo8 years ago

comment:1 follow-up: @josephscott8 years ago

  • Cc josephscott added

Have you tried this against various xmlrpc clients to see if any of them choke on this change?

comment:2 @josephscott8 years ago

  • Component changed from General to XML-RPC

comment:3 in reply to: ↑ 1 @filosofo8 years ago

Replying to josephscott:

Have you tried this against various xmlrpc clients to see if any of them choke on this change?

With two: Flock and a simple Perl script of mine that uses the RPC::XML package. Flock doesn't actually show the WP error messages to the user (as far as I can see), but it does write them to a log file just fine. Likewise, the Perl script using RPC::XML properly shows the error message (without parsing it).

Do you have a preferred client that you use for testing?

comment:4 @westi8 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

If we are going to change IXR_Error should we not also change IXR_Value to wrap strings in CDATA tags?

At present they are just htmlspecialchars'd

comment:5 @josephscott8 years ago

I had another response prepared for this, but then I went and looked at the xmlrpc spec again and it seems pretty clear that the faultstring value is a raw string. Unless there is something clearly to be gained by this change, which I don't see at this point, I don't see any reason to make this change.

I've sent out an email to the wp-xmlrpc list asking for additional feedback on this.

comment:6 @filosofo8 years ago

  • Milestone 2.5 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed
  • Version 2.5 deleted

You're right: that's what the spec says.

Note: See TracTickets for help on using tickets.