Bug #80559 [NEW]: xmlrpc_encode creates bad xml entities for chars 200 to 209
| From: | giunta dot gaetano at gmail dot com | Date: | Mon, 28 Dec 2020 20:17:43 +0000 |
| Subject: | Bug #80559 [NEW]: xmlrpc_encode creates bad xml entities for chars 200 to 209 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-231280@lists.php.net to get a copy of this message | ||
From: giunta dot gaetano at gmail dot com
Operating system: ubuntu
PHP version: 7.4.13
Package: XMLRPC-EPI related
Bug Type: Bug
Bug description:xmlrpc_encode creates bad xml entities for chars 200 to 209
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 bug report at https://bugs.php.net/bug.php?id=80559&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80559&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80559&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80559&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80559&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80559&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80559&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80559&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80559&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80559&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80559&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80559&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80559&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80559&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80559&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80559&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80559&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80559&r=mysqlcfg