[Bug 194357] New: KBlog generates invalid structured XML-RPC requests for the metaWeblog API

Berend Dekens kde at cyberwizzard.nl
Wed May 27 23:26:42 BST 2009


https://bugs.kde.org/show_bug.cgi?id=194357

           Summary: KBlog generates invalid structured XML-RPC requests
                    for the metaWeblog API
           Product: kde
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: unassigned-bugs at kde.org
        ReportedBy: kde at cyberwizzard.nl


Version:            (using KDE 4.2.3)
OS:                Linux
Installed from:    Gentoo Packages

KBlogger and Bilbo both use KBlog as the backend interface to send XML-RPC
requests to and from blogging sites (unless I understood something wrong).

When posting a new message using the metaWeblog.newPost the categories are set
as a QStringList object. The conversion from this object to the XML structure
is done incorrectly: a <array> element should have a <data> element holding
multiple <value> elements which should hold the <string> element.

For some reason, the generated XML structure ommits the <value> element and
only inserts the <string> elements. According to the XML-RPC specs at
http://www.xmlrpc.com/spec , this is not allowed and the PHP XML-RPC library
which is used for example in Joomla! refuses to parse the XML structure
generated for the XML-RPC communication with a "Invalid request payload xmlrpc
element STRING cannot be child of DATA" error.

For example, the KBlog backend sends this to the server:
<member>
   <name>categories</name>
   <value>
      <array>
         <data>
            <string><![CDATA[General blog entries [Blog]]]></string>
         </data>
      </array>
   </value>
</member>

This is not valid markup as it should be:
<member>
   <name>categories</name>
   <value>
      <array>
         <data>
            <value>
               <string><![CDATA[General blog entries [Blog]]]></string>
            </value>
         </data>
      </array>
   </value>
</member>

The wrong format is rejected and results in an error, the 2nd example is
accepted by the PHP XML-RPC library and also works for Joomla!.

Perhaps other blog systems are less strict and do not mind the omission of the
<value> elements but systems following the specifications to the letter throw
errors when KBlog tries to send the messages.

Note: I am assuming KBlog does the actual conversion from QStringList to the
XML structure, if I am in error, please let me know which part of KDE handles
XML-RPC.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list