Bug #80559 [Opn->Nab]: xmlrpc_encode creates bad xml entities for chars 200 to 209
| From: | requinix@php.net | Date: | Mon, 28 Dec 2020 22:25:03 +0000 |
| Subject: | Bug #80559 [Opn->Nab]: xmlrpc_encode creates bad xml entities for chars 200 to 209 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231286@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80559&edit=1
ID: 80559
Updated by: requinix@php.net
Reported by: giunta dot gaetano at gmail dot com
Summary: xmlrpc_encode creates bad xml entities for chars 200
to 209
-Status: Open
+Status: Not a bug
Type: Bug
Package: XMLRPC-EPI related
Operating System: ubuntu
PHP Version: 7.4.13
Block user comment: N
Private report: N
New Comment:
Upstream bug.
Bundled libxmlrpc-epi is good
http://git.php.net/?p=pecl/networking/xmlrpc.git;a=blob;f=libxmlrpc/xml_element.c;h=16787593516d492fcf720b0d3eea22934bae02f0;hb=refs/heads/master#l279
but this version on SourceForge does
https://sourceforge.net/p/xmlrpc-epi/git/ci/master/tree/src/xml_element.c#l290
Previous Comments:
------------------------------------------------------------------------
[2020-12-28 20:17:43] giunta dot gaetano at gmail dot com
Description:
------------
Function xmlrpc_encode and xmlrpc_encode_request do encode all characters above 127 to their numeric
entity representation, eg: chr(129) => ''
However there seems to be a bug for characters between 200 and 209 - for those the numeric entities
generated are '' to ''.
The code in the source library, file 'xml_element.c' seems to have a bug in function
create_xml_escape. The same bug would apply for characters 100 to 109, however that does not happen
because those characters are not encoded as entities in the first place.
Test script:
---------------
echo xmlrpc_encode(chr(199).chr(200).chr(209).chr(210);
Expected result:
----------------
<?xml version="1.0"
encoding="utf-8"?><params><param><value><string>ÇÈÑÒ</string></value></param></params>
Actual result:
--------------
<?xml version="1.0"
encoding="utf-8"?><params><param><value><string>ÇÒ</string></value></param></params>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80559&edit=1